What's new

rockets

Student
Joined
Oct 24, 2022
Messages
11
Reaction score
27
Location
CPH
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..
 

setoyami

Beginner
Joined
Nov 11, 2022
Messages
11
Reaction score
1
Location
Edmonton, AB
And here I thought trying to make a game for the Naomi was hard.

Hats off to you.
 

rockets

Student
Joined
Oct 24, 2022
Messages
11
Reaction score
27
Location
CPH
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!
 

rockets

Student
Joined
Oct 24, 2022
Messages
11
Reaction score
27
Location
CPH
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!
 

Fluffy

Champion
Joined
Dec 15, 2018
Messages
781
Reaction score
1,429
Location
Germany
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:

rockets

Student
Joined
Oct 24, 2022
Messages
11
Reaction score
27
Location
CPH
@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.
 
Top