Some ideas for battery (saves) and controller input
Posted: Mon Dec 03, 2018 6:08 pm
I have a static machine image that I have an embedded gameboy color emulator inside. The OS doesnt really have a good disk driver or writable filesystem, so I need some ideas for how to save games. The GBC battery state is either 32kb (most times) or 128kb (sometimes).
My idea is to use a REST endpoint to send and receive savedata. Is there any other simpler way to do this? On bare metal the network solution seems best.
Another thought was controlling the emulator with joypad by reading linux /dev/input/js0: character special (13/0)
Then parsing that data and sending the button/axis states over network... again.
Do you know of anything that already parses joystick data and sends it over network? If so I would like to just use it. Wouldnt have to reinvent the wheel.
Fun fact, the screen is in 13h and since it only has 256 colors I have to trap on palette changes in the emulator and write the palette to VGA. I also do a color scaling to make the colors more appealing.
Its happening here: https://github.com/fwsGonzo/gamebro/blo ... ce.cpp#L97
One last question. 13h is 320x200, is it pointless to try to scale up the image in the emulator with this low resolution? I cant imagine it would look good. The DMG/CGB screen is 160x144 pixels.
And bonus fun fact: DMG is acronym for Dot Matrix Game which was the working title for the original Gameboy!
Thanks!
gonzo
My idea is to use a REST endpoint to send and receive savedata. Is there any other simpler way to do this? On bare metal the network solution seems best.
Another thought was controlling the emulator with joypad by reading linux /dev/input/js0: character special (13/0)
Then parsing that data and sending the button/axis states over network... again.
Do you know of anything that already parses joystick data and sends it over network? If so I would like to just use it. Wouldnt have to reinvent the wheel.
Fun fact, the screen is in 13h and since it only has 256 colors I have to trap on palette changes in the emulator and write the palette to VGA. I also do a color scaling to make the colors more appealing.
Its happening here: https://github.com/fwsGonzo/gamebro/blo ... ce.cpp#L97
One last question. 13h is 320x200, is it pointless to try to scale up the image in the emulator with this low resolution? I cant imagine it would look good. The DMG/CGB screen is 160x144 pixels.
And bonus fun fact: DMG is acronym for Dot Matrix Game which was the working title for the original Gameboy!
Thanks!
gonzo