Hey, Does anybody here have any experience with parsing though Mame Code? At the moment I'm kind of seeking out what I wan to work on over my Christmas break and one of the things I've always though about is building a portable PS1 Arcade Emu (System10/11/12/Zn1/Zn2/G-Net). I understand a decent amount of MIPS and can easily get all the info together to build a R3000 CPU Emu. My problem is, I don't know where to begin on figuring out the other components to these arcade boards. I know they are emulated in mame and as such Mame should have the info I need (like where are roms loaded/addressed, any custom chips that need emulation, etc). So does anybody have any general info or tips on how to parse this stuff out of mame? I think I checked one time and it was a bit confusing.
You're best bet would be to read over the Mame source as there's a lot of documentation in the headers. Ex: http://mamedev.org/source/src/mame/drivers/namcos10.c.html
MAME is a macro nightmare. Still it shouldn't be hard to extract what you need. The driver will contain the memory map(s), registers & I/O, raster/render code will be under video. Decoding is generated dynamically, so it's pretty easy to follow.
Mame may be a "Macro-horror", but once you get over understanding the few basic macros used for handling memory and bits all the rest follows flawlessy. Also, another way to go is probably to step through / read the code. kammedo
subbie, once you've got all the basics figured out, you can use Pete's PSX GPU plugins since they have ZN support as far as I can recall. http://www.pbernert.com/html/gpu.htm - it should be endian friendly too, and he recently released the hardware accelerated plugin source.
Sweet. Thanks for the tip on that one. =D I think once I get my head wrapped around how a PCB with roms works vs a console I should be able to get somewhere pretty quickly (first will just get a interpreter going then move over to a recompiler). Off the bat quesiton (it's been a while). Any idea if the PS1 CPU used Tbl instructions or did it have a custom COP0? -edit- looks like does. =/ (damn it)
Tlb or ps1? For me the difficulty in tlb is it makes building a static recompiler pretty difficult. =( Emulating mips it self will be pretty straight forward for me since i'm most comfortable with mips instruction set (specially after trying to do a n64 emu on psp way back). Actually I should maybe look into a few sys 10/11 games and see if any actually use the tbl instructions (possible they might ignore them).
Eh, not fully sure. I think my primary target is portable devices. I mean hell if you have a pc you can probably run it through mame just fine. But I'll probably still keep an interpreter core for when porting to new platforms. On a PSP an interpreter would be too slow.