Tandy vs. Jr Sound -- differences?

Discussions on programming older machines

Tandy vs. Jr Sound -- differences?

Postby deathshadow60 » Wed Jan 19, 2011 10:42 pm

I'm just curious how many differences there actually are between the two -- if any. I've been working on a sound library that I'd like to work on both... I did luck into a nice .txt by one "John A. Ball" circa 1994 that FINALLY explained how it's actually mapped out which is how I've gotten as far as I have.

The documentation and examples I've found seem a bit vague, but what I've got so far is:

Reset/setup:
Code: Select all
{ try BIOS if available }
mov  ax,$8003
int  $1A
{ and then manually set for older machines just in case }
mov  al,$6C
out  $61,al
mov  ax,$8003
int  $1A


and then tone output:
Code: Select all
(voice:byte; tone:word; level:byte); assembler;
asm

{   port[$C0]:=$80 or (voice*$20) or (tone and $0F); }

   mov  dx,$C0

   mov  cl,voice
   mov  al,$10
   shl  al,cl
   and  al,$60
   or   al,$80
   mov  ch,al { save channel for level set }
   mov  bx,tone
   mov  ah,bl
   and  ah,$0F
   or   al,ah
   out  dx,al

{   port[$C0]:=tone shr 4; }

   shr  bx,1
   shr  bx,1
   shr  bx,1
   shr  bx,1
   mov  al,bl
   out  dx,al

{   port[$C0]:=$90 or (voice*$20) or level; }

   mov  al,level
   or   al,ch
   or   al,$10
   out  dx,al

end;


Just wondering if there's any changes I need to make to that to get the Jr. happy as I don't have a Jr. for testing at the moment. (buddy with one just got deployed). It works on my Tandy EX and HX, but I've had the minor differences bite me in the backside in the past. (I really need to add a Jr. to the collection -- maybe next month). I'm not even playing with the 'noise' channel as the three melodic voices are more than adequate for what I'm working on.

Heading to bed right now, but I can post up a test program in the morning...
The only thing about Adobe web development products that can be considered professional grade tools are the people promoting their use.
deathshadow60
 
Posts: 62
Joined: Mon Jan 10, 2011 6:17 am
Location: Keene, NH

Re: Tandy vs. Jr Sound -- differences?

Postby Trixter » Wed Mar 09, 2011 11:10 am

The first code snippet should have you covered. The different between Tandy and PCjr is that the PCjr's sound routing can route either the internal speaker *or* the 3-voice, but not both simultaneously, and the port 61 bit in your code enables the routing. Tandy doesn't require this, so most code from 1988 and later simply omit it. (This gives the Tandy an edge, in that both speaker and 3-voice can be audible at the same time, giving you 4 total square waves to play with, albeit one without volume).

I have working code posted in the download for MONOTONE at http://www.oldskool.org/pc/MONOTONE if you'd like another working example. I document the bits needed to set the multiplexer properly, which is important when existing your program so that the internal pc speaker starts working again.

I'd like to look at that John Ball document, do you have it available? I'd like to research the BIOS thing a bit more.
You're all insane and trying to steal my magic bag!
Trixter
 
Posts: 523
Joined: Mon Sep 01, 2008 12:00 am
Location: Illinois, USA

Re: Tandy vs. Jr Sound -- differences?

Postby GHiero » Sun Feb 02, 2014 1:06 pm

Trixter wrote:The first code snippet should have you covered. The different between Tandy and PCjr is that the PCjr's sound routing can route either the internal speaker *or* the 3-voice, but not both simultaneously, and the port 61 bit in your code enables the routing. Tandy doesn't require this, so most code from 1988 and later simply omit it. (This gives the Tandy an edge, in that both speaker and 3-voice can be audible at the same time, giving you 4 total square waves to play with, albeit one without volume).

I have working code posted in the download for MONOTONE at http://www.oldskool.org/pc/MONOTONE if you'd like another working example. I document the bits needed to set the multiplexer properly, which is important when existing your program so that the internal pc speaker starts working again.

I'd like to look at that John Ball document, do you have it available? I'd like to research the BIOS thing a bit more.


I hate to resurrect old posts, but I think it should be made clear that you can hear PC Speaker and 3-voice music from the PCjr. at the same time, but the PC Speaker music will always be played from the PCjr.'s built-in speaker while the 3-voice music will be heard from the RCA audio output jack or from the PCjr. Color Display or from the Television RF Modulator.
GHiero
 
Posts: 116
Joined: Wed Oct 16, 2013 7:53 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests