Well I finally have some stuff working (and it is indeed tricky).
One interesting thing I've noticed after reading the code over and over is that mame doesn't seem to use the bios z80 driver at all. It loads it in initially, but as soon as the driver inits, the cart z80 driver gets loaded in and never switches back. I do the same in my emulator and it seems to work fine.
The relevant code is this (in neogeo.c, ~line 742):
static void _set_audio_cpu_rom_source(void) { /* if (!memory_region(NEOGEO_REGION_AUDIO_CPU_BIOS)) */ audio_cpu_rom_source = 1;
memory_set_bank(NEOGEO_BANK_AUDIO_CPU_MAIN_BANK, audio_cpu_rom_source); ...
The commented line looks like it was origonally a fallback in case the bios z80 rom didn't exist. But as it stands, this will skip the bios in all cases.
> Hi, > > I suggest that you take a look at Final Burn Alpha and gngeo sources. Sound > support is a bit tricky to get working. Also make sure that your memory and Z80 > port handlers are set-up correctly. > > stay safe, > > AamirM > > PS: I am a Neogeo emu author :) (download the beta version from > http://www.mytempdir.com/2022594) > > > Any NeoGeo authors have any tips about getting sound to work? > > > > I have the Z80 running, and I pass the bios Z80 check. However, the ym2610 > > never gets a request to start an adpcm channel (I don't even care about the FM > > stuff yet). > > > > I have the ym2610 timers running, and I've verified they are sending IRQs to > the > > Z80. I'm giving the Z80 a NMI when the 68k sends a sound command. > > > > I don't have much debugging capability on my target system, so it's hard for > me > > to track down problems. Any insights would be very much appreciated. > > >
|