What's new
Hi!

I got a little further. Had some problems with MAME crashing after running my code for a few frames. Tried to compile MAME with Visual Studio to be able to track the crash so I could get an idea of what was wrong. That was harder than expected. MAME is so big that my machine ran out of memory multiple times and also disk space! Finally I managed to get a stripped down MAME working that only emulates System 32. A lot easier to work with!

The issue turned out that I got a timer interrrupt and the code to handle that just did a 'halt' and then MAME basically gives up. Got that fixed and then tried to something on screen. That turned out a little harder than expected - mostly due to an error in the System32 docs I have. I also encountered some small bugs in the assembler I'm using, but I can work around those for now.

Anyway, got stuff running using the TEXT layer! It's amazing stuff! :D
View: https://youtu.be/4qS053XpdyA


Next task will be to try getting the other tile layers working. The docs don't really mention where they get their data from, so I guess I have to dive down into the MAME sources..
 
And here I thought trying to make a game for the Naomi was hard.

Hats off to you.
 
And here I thought trying to make a game for the Naomi was hard.

Hats off to you.
Hehe.. There might be a bit more docs on Naomi. At least I hope so :)

I have a special place in my heart for Dreamcast so that naturally extends to Naomi! Sounds cool!
 
Update!

Dived into the tile hardware a bit more. Figured out most I need to know right now. I was really confused about the palette organization - it's super weird. The tile index and the palette index is actually the same index! That will probably cause some headaches on the tooling front later on..

I hacked up a small tile-editor that can export tile-maps and tile-patterns. I used some old graphics I had lying around from an unreleased Amiga game I worked on back in the day.

Tile layers with parallax

Next up: Sprites!
 
I'm a fan of Tiled as a map editor. Before I started my current gig I did some investigations into the various tile editors available at that time, and Tiled was pretty much 99% what I'd write myself.
My current pipeline for this kind of thing consumes a TMX file from Tiled in a python script, loads the tile graphics with PIL, massages the graphics into hardware format (extract palette and colour indices, palettes, collapses reflected/duplicate tiles, removes empty tiles, etc.) and then writes out hardware specific data. Tile graphics are stored in 256-colour indexed format, organised by palette.
That way I can just re-run the build script if I change my mind on export formats, instead of reexporting maps from the editor.
 
Last edited:
@Fluffy: Cool.. never heard about Tiled before. Looks cool. I'm already too far with my own solution so I'm gonna go with that - but yeah probably a lot of overlap :)

Ok, got a sprite on screen now. I also got some PCM audio working. It was quite fun doing some Z80 stuff again - that's the CPU that started it all for me back in the day :) The audio was a bit harder than expected. I thought the PCM chip could read its data directly from ROMs but it turns out you need to do all the ROM banking fiddling with the Z80 using 8K windows and then copy to the PCM chip's internal RAM in 4K banks.

I haven't looked into the FM sound stuff yet, but shouldn't be too hard. I'm a bit curious about timing on the Z80 since the games I've looked at seems not to use interrupts at all - maybe all timing is handled on the V60 side and the Z80 just spins in a loop waiting for commands from the other side.

Anyway, I've now got my own ROM data for everything: Main CPU, sound CPU, Tile pattern data, Sprite data and sound data. So, next step should really be trying to get that on real HW and see what happens.
 
Hey, did you ever get any more working? as this was awesome work you were doing sir.
 
Hey! Not been working on it much lately :(

The plan is still to try to burn some ROMS with what I running in MAME and try to run that on a real System32.

I've been doing some work on some tools though. Tile editor and sprite editor, but I think I need that test on real HW to really get going again.
 
Back
Top