MAKOTO V3 driver

From NeoGeo Development Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Cold boot process

  • DI, SP at $FFFC, IM=1
  • Clear $F800~$FFFF
  • Clear the command buffer (128 bytes) and pointers
  • Silences FM, PCM and SSG
  • OUT ($C0),A = 1
  • stuff with timer A
  • banks init:
ld      a,#1e
in      a,(#08)
ld      a,#0e
in      a,(#09)
ld      a,#06
in      a,(#0a)
ld      a,#02
in      a,(#0b)
  • Reset FM
  • out (#08),a
  • EI
  • loop while buffer read index = buffer in index
  • inc buffer read index
  • AND index with $3F (keeps it under 64)
  • Reads buffer, clears entry to 0
  • If command = 0, read R, out (#0c),a and loop back to EI
  • If command != 0:
  • Translate command by LUT, ret if =0, can be anything 1~5.
  • LUT is something like 0,1...,2...,0...,5...,0...4...,0...,3,3
  • 1:Special command, uses a jump table (0~27)
    • 0:RET, should not happen
    • 1:DI,reset banks,out (#0c),a=0, wait,out (#0c),a=0 again, init YM2610, out (#0c),a=1

Has a 2*64 byte command FIFO.

  • Command 5: Stop music (pause ?)
  • Command 7: Play music in following byte
  • Command A: Fade, speed in following byte
  • Command E: Set music speed

Command type translation table at $4FAF.

  • 0: Ignore
  • 1: Special command
  • 2: ?
  • 3: ?
  • 4: ?
  • 5: ?