MAKOTO V3 driver

From NeoGeo Development Wiki
Revision as of 01:19, 25 December 2011 by Furrtek (talk | contribs) (Created page with "==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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

0174 3e1e ld a,#1e 0176 db08 in a,(#08) 0178 3e0e ld a,#0e 017a db09 in a,(#09) 017c 3e06 ld a,#06 017e db0a in a,(#0a) 0180 3e02 ld a,#02 0182 db0b 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: ?