This is a little piece of Micro Music code:

; OUTPUT TO MSX-MUSIC -------------------------------------------------------
; IN: B=REGISTER, A=DATA
; OUT: NOP
; MOD: NOP
;
FMOUT: JR R8FMOUT ; ga uit van TURBO-R computer
       PUSH BC
       PUSH AF
       LD A,B
       LD BC,(FMPORT)
       OUT (C),A
       NOP
       INC C
       POP AF
       OUT (C),A
       POP BC
       RET
FMPORT: DW 7CH

R8FMOUT:PUSH BC
       PUSH AF
       IN A,(0E6H)
       LD C,A
FMOUT1: IN A,(0E6H)
       SUB C
       CP 6
       JR C,FMOUT1
       LD A,B
       OUT (7CH),A
       IN A,(0E6H)
       LD C,A
FMOUT2: IN A,(0E6H)
       SUB C
       CP 1
       JR C,FMOUT2
       POP AF
       OUT (7DH),A
       POP BC
       RET

INITFM: LD C,9
       LD B,30H
INITFM1:LD A,0FH
       CALL FMOUT
       INC B
       DEC C
       JR NZ,INITFM1
       JP INIPSG

The 'JR R8FMOUT'is self modifying.
The music player routines came from Micro Cabin's Princess Maker. In the first
versions of Micro Music the player came from Xak-I.

Frits

PS. What do you know about port A7 ?
 
 

Laurens Holst wrote:

> The Turbo-R has a timer build in that is increased every 1 microsecond or
so.
> Maybe 2 or more microseconds, I don't known the exact value. And it did
> have something todo with I/O ports E5 / E6, or any number near these
numbers.

I/O ports E5/E6... that's the timer of the MSX-MIDI. It also has another
timer used by the PCM play routines. However, it is only 2-bit or so...

> All I know for sure is that when writing into the FM-PAC registers the
core code
> for playing music uses this timer to wait between two OUT
(port),register/value
> instructions. If the timer isn't increased than the whole program will
lock up.
>
> This behaviour is also implemented in my own TSR program Micro Music.

Oh? What is it???

> The MSX2+ does not have this timer, by my knowledge.

Nope...

~Grauw

--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
          email me: [EMAIL PROTECTED] or ICQ: 10196372
             visit the Datax homepage at http://datax.cjb.net/
MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to