MSX-AUDIO programming
This page was last modified 08:43, 31 October 2019 by Gdx. Based on work by Mars2000you.

Contents

MSX-AUDIO detection

To found the MSX-AUDIO with MBIOS, you must read the bytes from 0080h to 0084h in the all slots. These bytes must contain the string "AUDIO".

(Need help)

I/O ports

  • C0h = Register number for the master Y8950 (write only, 12 cycle of delay time)
  • C1h = Register data for the master Y8950 (write only for most registers, 84 cycle of delay time or 12 in data write mode column)
  • C2h = Register number for the slave Y8950 (write only, 12 cycle of delay time)
  • C3h = Register data for the slave Y8950 (write only for most registers, 84 cycle of delay time or 12 in data write mode column)

These I/O ports are configurable by writing one of the following values to address 3FFEh (bits 1-0).

	00 = Disable ports C0h~C3h. (Initial value)
	01 = Assign ports C0h~C1h to access the Y8950 registers.
	10 = Assign the ports C2h~C3h to access the Y8950 registers.
	11 = Assign ports C0h~C1h and C2h~C3h (For cartridge with two Y8950).

RAM/ROM mapper

MSX-AUDIO should include a 128kB ROM and 4kB work-RAM. The ROM is divised in 4 segments of 32kB. These are mapped in the same slot as described below.

The memory map is as that:

Page 0000h~2FFFh = MBIOS (fixed)
Page 3000h~3FFFh = 4kB RAM from the MSX-AUDIO cartridge (fixed)
Page 4000h~BFFFh = Selected segment (0 by default)

Following segments are selectable by a writting at 3FFFh (bits 1-0) in MSX-AUDIO slot. This switching address is mirrored at 7FFFh.

  • Segment 0 contains the MSX-AUDIO BASIC extension (4000h~6FFFh) and the 4kB RAM mirror (7000h~7FFFh)
  • Segment 1 is the Custom firmware (4000h~BFFFh)
  • Segment 2 is ADPCM data 1 (4000h~BFFFh)
  • Segment 3 is ADPCM data 2 (4000h~BFFFh)

Links

MSX-Datapack translation: