This includes :
- Improved FBDEV code.
- Allow saving of config file.
- Minor fixes.
- Change text drawing routines to smaller ones on the RS-97, SDL and FBDEV ports.
- Allow setting the sound volume. (some ports for now only)
This was mostly done to allow us to decrease the size of the binary
when using static linking as well as avoid the overhead of libSDL.
The input code reads directly from /dev/input/event0 (which is the keyboard).
It does seem to suffer from ghosting (?) when the program slows down a lot.
This does not happen on libSDL so i'm not sure what to do,
it seems that they might be using threads to solve this issue ?
The FBDev code does not currently support double buffering :
This would require us doubling the vertical size of the allocated
resolution.
The Pandora wiki explains how this is implemented with fbdev :
https://pandorawiki.org/Kernel_interface
To be fair i'm not even sure 267 is correct but there's no glitches with Dizzy
with that value.
I probably should have not removed overscan emulation from SMS Plus GX.
The bittboy code should be shared with the RS-97's one now.
Hopefully this shouldn't cause any issues due to framebuffer bugs.
A bug with SRAM not saving properly has also been addressed
accross all ports. This should fix saving in games like Penguin Land etc...
Everything also got tightened and i tried to address the clang errors
so we should be good now.
We broke save states along the way when we improperly switched variable
types.
The end result is also a lot of needless conversions between types.
This commit should hopefully address that, and we fixed broken save
states.
There were two issues with that game :
1) It tries to display a sprite being overbound.
The simple fix for this is to use an unsigned 8-bits variable rather
than using a signed 32-bits value and checking if it goes overbound.
This simplification fixes the sprite issue in the upper right of the screen
when ingame.
2) It would not scroll the HUD properly.
Not quite sure what's the issue exactly but it seems that
it shouldn't use v_line but line instead when stopping the vscroll.
This fixes the vertical scrolling in Gauntlet.
All of these issues were introduced by ekeeke when he revamped the code
in SMS Plus GX.
Sonic's Edusoft relies on this behaviour and it also works properly when that bit is
set to 0xE0.
(All of the known BIOSes set that bit to 0xE0 before booting a cartridge)
Removing said game hack since it is no longer required.
of the SMS BIOS. It's kind of a hack right now until the proper behaviour
is figured out.
No known SMS emulator (not even MEKA-git nor Genesis Plus GX as of now) implements this corner-case as far as i know.
Really a dumb issue really. This is fixed but it seems that SMS Plus GX
is not that good when it comes to Colecovision emulation.
Maybe i somehow broke it along the way ?
accurate anyway.)
Updating the emulator's core code to fix some issues reported by Clang/GCC.
(bios.pages was 8-bits even though cart.pages was 16-bits.
This could cause issues if a game like Bad Apple is played using the bios.)
Removing error.c/error.h, it was never used.
I'm trying to fix the signing/unsigned issues that i had introduced
a while back unfortunately (though the older code still suffered from it
to some code).
Some of it is fixed but not all of it is fixed. Ideally, this should
be switched to using 32-bits ints if possible.
One of them is a fix for a really odd bug with the proprietary z80 core :
Pause button would not work.
For some reasons, executing the irq line functions will not work if
put in a function so what i did was a bunch of macros instead.
This now works and reduces the complexity of the code kinda.
(Also inlining)
There's also a fix for the ALSA code. On the bittboy,
it woud sometimes underrun. When it does so, it becomes mute.
Fixed this by handling underruns and removing non blocking.
(Useless anyway here)
I will probably regret doing huge commits like this one but
i'm too lazy to make smaller commits out of it so i'll make a
huge changelog instead.
I tried to make it more modular and this is the result of it.
In the Makefiles, you can easily choose the Sound API of your liking
as well as the fine-tuned SDL port you want to use.
Sound output : I finally addressed the SDL port as far sound is concerned,
and the SDL sound api is now supported again and properly this time.
I also added support for ALSA, OSS, libao, Portaudio and Pulseaudio.
Won't do DirectSound and/or WaveOut because fuck Windows :P
(but if you are interested, open a bug report)
Z80 core : When i added back the proprietary z80 core, i added version 3.4,
not the later version 3.9 that was improved by Exophase himself.
This should hopefully address the inaccuracy flaws that the old version had.
My mistake
I did a lot of cleaning too. I removed the old unsupported files
since they are now useless and you are better off using the
newer code instead.