I want to start hacking MAME, but before I dive-in blind and end up lost and frustrated I want to say out loud where I want to begin and throw the question open to guidance from forum members. FYI: I am already a programmer, just not one with experience using emulators.
The first thing I wanted to do is to write a program which records a controller stream from a game being played and writes it to a file, and it can also feed a controller stream to a game loaded from such a file.
I intend to use a basic ASCII readable RLE format like:
50 n 200 u 10 f
(For 50 frames of neutral then 200 frames of UP then 10 frames of Fire).
Ideally, I'd like the data to be fed in by something which traps controller-port read operation in the game, ie something which traps the operations which load the controller status and feeds them data directly.
On a Commodore 64 for example, this would trap any LDA $DC01 and feed it controller port data sequentially.
The basic question then is:
I want to transparently trap controller-port reads in Mame, where do I start?
Thanks, I hope that's clear.
Edited by JHake (01/28/21 02:07 PM)
|