?login_element?

Subversion Repositories NedoOS

Rev

Rev 1797 | Rev 1959 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. MOON_BASE = 0xc4
  2. MOON_REG1 = MOON_BASE
  3. MOON_DAT1 = MOON_BASE+1
  4. MOON_REG2 = MOON_BASE+2
  5. MOON_DAT2 = MOON_BASE+3
  6. MOON_STAT = MOON_BASE
  7. MOON_WREG = 0xc2
  8. MOON_WDAT = MOON_WREG+1
  9.  
  10. ;TODO: is this good enough for ATM2?
  11.         macro opl4_wait
  12.         in a,(MOON_STAT)
  13.         rrca
  14.         jr c,$-3
  15.         endm
  16.  
  17. ;makes ZXM-Moonsound firmware 1.01 switch PCM ports from default 7E and 7F to C2 and C3
  18.         macro switch_to_pcm_ports_c2_c3
  19.         in a,(MOON_REG2)
  20.         endm
  21.  
  22. ismoonsoundpresent
  23. ;out: zf=1 if Moonsound is present, zf=0 if not
  24.         switch_to_pcm_ports_c2_c3
  25.         in a,(MOON_STAT)
  26.         cp 255
  27.         ccf
  28.         sbc a,a
  29.         ret
  30.  
  31. MOONSOUNDROMSIZE = 0x200000
  32. MOONWAVEHEADERSIZE = 12
  33. MOONRAMWAVETABLESIZE = 128
  34.