Commit Graph

157 Commits

Author SHA1 Message Date
gameblabla
099408fd8d
Fix oversight with the state functions in header using FILE* mem
when it should be fd.
2019-07-16 13:28:54 +02:00
gameblabla
da58d4a159
Since channel_masks is an unsigned char, we should set the value
to 0xFF, not 0xFFFFFFFF.
2019-07-16 13:28:15 +02:00
gameblabla
77c9c68924
Fix fallthrough issue on condition that is never goin to happen. 2019-07-16 13:27:41 +02:00
gameblabla
0645265d20
No need to set "source" to 0 since it's being assigned a value
shortly after it.
2019-07-16 13:26:36 +02:00
gameblabla
aeb4937303
Fix compiling issues when using GCC 9.1. 2019-07-16 13:12:50 +02:00
gameblabla
76047de5f4
Numerous fixes for games, ports etc...
Fixes Alibaba and 40 Thievs, sound fixes and other minor issues as well.
2019-06-06 16:30:11 +00:00
gameblabla
95e823b80b
Set country to 0 after loading configuration as it could save
the country value from the last game played and we don't want that.
2019-06-06 18:19:16 +02:00
gameblabla
99a9804f57
Fixes Alibaba and 40 Thieves, Block Hole due to uninitiliazed memory
when games are played on the Japanese BIOS.
See more about it here :
https://www.smspower.org/forums/13333-UninitializedMemoryPatterns
2019-06-06 18:18:12 +02:00
gameblabla
f7ca4110f5
Reduce the number of SN76489 PSGs to 1 and tweak the Cutoff
value as to be more accurate to the real hardware.
2019-06-06 17:09:54 +02:00
gameblabla
1af340ac1f
Properly configure Maxim PSG's for consoles like the SG-1000 & Colecovision. 2019-06-06 17:08:38 +02:00
scooterpsu
b6fb7bb482 Bittboy: fix 1.5x scale skipped if not gg w/ button press 2019-06-06 10:08:02 -04:00
scooterpsu
205343a7fe Fix button names for remapping 2019-06-06 09:56:56 -04:00
gameblabla
9c1c783094
Fix (or should i say "hack"...) for the zipit. 2019-06-03 18:44:59 +02:00
gameblabla
69c8fcf6d8
Other minor modifications i forgot to upload, i hope that nothing breaks. 2019-06-03 02:31:45 +02:00
gameblabla
0134cb1b50
Zipit port, no sound on real hardware though ? 2019-06-03 02:26:34 +02:00
gameblabla
ea48260831
Fix issue with Colecovision buttons as it breaks the assumption made by the code. 2019-05-17 14:40:49 +02:00
gameblabla
7164b74b8d
Fixing remapping support for Colecovision buttons again. 2019-05-17 14:28:25 +02:00
gameblabla
03fbd1b7f1
Add remapping support for RS-90 port. 2019-05-16 19:04:47 +02:00
gameblabla
7d2679b617
Remove un-necesarry option.game_name. 2019-05-01 14:42:49 +02:00
gameblabla
df51902087
Run pcm_nonblock before alloca.
According to senquack, this should be done before hw/sw params are set.
2019-05-01 14:41:47 +02:00
gameblabla
c9dbf26a5c
Add RS-90 port, with makefile and all. 2019-05-01 10:54:30 +02:00
gameblabla
1d21911e36
Slight simplification to audio code. (removing extra conditions
that could cause issues anyway)
2019-04-16 03:56:52 +02:00
gameblabla
535bdc8b1e
Add missing variable for input remapping. (Bittboy only for now but other platforms will be added) 2019-04-16 03:56:17 +02:00
gameblabla
eba8b29857
Adding Remapping support for Bittboy port.
(I might add it for other ports as well.)
2019-04-16 03:55:11 +02:00
gameblabla
948a35a93e
Add textblue define. 2019-04-10 18:27:06 +02:00
gameblabla
925bb06e8e
Fix issue with FB text drawing function. 2019-04-10 18:25:29 +02:00
gameblabla
ba92b72600
Adding Retrostone port. 2019-04-10 18:23:25 +02:00
gameblabla
c6bb7035c8
Fixes compile issue. Oops 2019-04-08 19:08:34 +02:00
gameblabla
78ba08f369
Improved ALSA code. Should be less finicky. 2019-04-08 19:05:01 +02:00
gameblabla
c50c12238c
Add PAP Gameta II port. 2019-03-25 02:17:39 +01:00
gameblabla
fba7202072
Forgot ; from function. 2019-03-25 02:02:21 +01:00
gameblabla
78a3d9aa95
Add scalers for PAP Gameta II. 2019-03-25 01:54:31 +01:00
gameblabla
a2a56aa729
Fixed PAP K3S port on Game Gear games when pressing start.
(forgot to fix this, oh well)
2019-03-25 01:50:12 +01:00
gameblabla
3a1968635c
Fix an issue with the font drawing code where the width was hardcoded.
Fixed this so it makes use of the HOST defines.
2019-03-22 09:35:56 +01:00
gameblabla
ab85700fbe
Fixes a mistake in the ports where it would load SMS games as the last
platform you played. (Game Gear in particular)
Since it also save the console you last played, then it should set it back
to 0 as intended.
2019-03-22 09:34:45 +01:00
gameblabla
7b307cce26
Change the Scale2 code a bit as to make use of 16-bits pointers
instead of 8-bits pointers. This should greatly improve the speed
on devices like the RS-97 and GCW0.
2019-03-22 08:38:02 +01:00
gameblabla
f15c03efd0
Fix Start bug issue on Sega Game Gear games. 2019-03-16 11:21:34 +01:00
gameblabla
9fad280dca
Update the sound output code. Minor fixes, mostly to allow the
sound volume to be toggeable from the menu. (via the config structure)

Also changing NON blocking option to another define.
2019-03-15 20:55:01 +01:00
gameblabla
3d5d2db30c
Update the ports specific code.
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)
2019-03-15 20:53:18 +01:00
gameblabla
cf3e55eb2d
Fix minor issues in vdp code. 2019-03-15 20:52:49 +01:00
gameblabla
c37584f728
Fixes save states issues for good. 2019-03-15 20:52:29 +01:00
gameblabla
b0de1e24d3
Minor fixes to headers. 2019-03-15 20:48:40 +01:00
gameblabla
4414acd4fe
Set brightness to its highest level for Master System.
Also minor fixes.
2019-03-15 20:47:55 +01:00
gameblabla
0e773b6f30
Fix more clang warnings in files. 2019-03-15 20:46:57 +01:00
gameblabla
0e0373185f
Fix clang warnings in text/fb 2019-03-15 20:46:23 +01:00
gameblabla
ebbde23f34
Slight modifications to miniz to avoid warnings and errors.
Also makes clang slightly happier.
2019-03-15 20:45:33 +01:00
gameblabla
a726922722
Whitespacing that shit in loadrom.c 2019-03-15 20:03:10 +01:00
gameblabla
0fdb3e3424
*facepalm* Made a mistake in fread. That was the cause of our headaches
in save states.
2019-03-14 22:11:17 +01:00
gameblabla
71168d94e5
Remove SDL headers from scale2x. (it is platform agnostic) 2019-03-14 03:24:37 +01:00
gameblabla
11ee7bcf20
Add soundlevel to config.h and removing useless variables from it. 2019-03-14 03:24:01 +01:00
gameblabla
35fef879c0
Add Text code taken from n2DLib for FBDev.
Also moving the SDL specific code to its own subfolder.
2019-03-14 03:23:19 +01:00
gameblabla
36895b5b88
Move Generic scaler code to scalers/ folder. 2019-03-14 03:22:57 +01:00
gameblabla
fbdabaa895
Removing "Generic" folder, we will be moving them to another location.
This was done because the FBdev code required different code paths
for text drawing.
2019-03-14 03:22:08 +01:00
gameblabla
14b3e6f24b
Updates the other ports to account for an upcoming commit
related to soundlevel.
2019-03-14 03:14:48 +01:00
gameblabla
cca26bd419
Avoid using fputc and prefer just using fwrite instead.
Should make our source code more consistent.
2019-03-14 03:07:34 +01:00
gameblabla
5fad968049
No more Clang bitching in VDP.c.
We should be sticking with uint8_t here.
2019-03-14 03:06:48 +01:00
gameblabla
e3156e37ce
Add FBDev/evdev port for Embedded linux platforms.
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
2019-03-14 03:00:19 +01:00
gameblabla
2ba43256b4
Allow NoZIP builds to be built. Saves around ~20Kb. 2019-03-14 02:47:05 +01:00
gameblabla
2f2892b0f3
Using Miniz instead of Zlib for zip archives.
This helps save some space on fully static build.
2019-03-14 02:46:23 +01:00
gameblabla
c624e175f1
This should fix the other PAL specific issues with Fantastic Dizzy.
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.
2019-03-14 02:43:24 +01:00
gameblabla
1daf0d8dd9
Update the RS-97 & Arcade Mini ports.
Fix an issue with fullscreen variable along with other minor issues.
2019-03-13 04:15:21 +01:00
gameblabla
f1d1e42a47
Fix invalid state.c file.
Oddly enough, the compiler would not error out.
2019-03-13 04:14:46 +01:00
gameblabla
bd31da5145
Update the ports, delete bittboy specific code.
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.
2019-03-13 02:46:39 +01:00
gameblabla
66746c951b
Add Scale2x files.
They are slightly modified for our own use (especially 16-bits output)
but otherwise it should be the same.
2019-03-13 02:11:38 +01:00
gameblabla
8f5b90b1b9
Uuuuugggh, i swear this is driving me insane. 2019-03-13 02:11:04 +01:00
gameblabla
6f84b7fa5c
Partially reverting old commit "Removing CrabEmuZ80"
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.
2019-03-13 01:48:28 +01:00
gameblabla
5431940365
Fixed PAL specific regressions with overscan.
Also forcing Fantastic Dizzy to run in PAL mode instead
in order to fix graphical issues in the HUD.

This fixes the issues in Fantastic Dizzy.
2019-03-11 23:53:32 +01:00
gameblabla
4b30b6fd32
Fixes for Gauntley display issues.
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.
2019-03-11 14:53:43 +01:00
gameblabla
ff1201902b
Set VDP Register 1 to 0xE0 after multiple testing.
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.
2019-03-09 10:30:22 +01:00
gameblabla
02a6e57e4e
Removing extra externs for CrabEmu's PSG core.
It's already defined so removing those.
2019-03-09 05:19:36 +01:00
gameblabla
7a7c833972
Uncommenting stuff for CrabEmu's PSG emulator.
I hate myself for doing shit like that...
2019-03-09 05:18:15 +01:00
gameblabla
cf55589e88
Nope, it should definitetly be like that. 2019-03-09 03:48:12 +01:00
gameblabla
bcccf6abb9
Add support for unmodified Sonic's Edusoft rom dump without requiring a copy
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.
2019-03-09 03:27:59 +01:00
gameblabla
2474ca1cec
Sample size for Portaudio should not be set to 0... 2019-03-08 01:34:28 +01:00
gameblabla
e5130e5e9a
Minor fixes for sound output code. 2019-03-08 01:30:09 +01:00
gameblabla
9d0b849937
Use defines for pop/push/wm16/rm16/add16/adc_hl/sbc_hl due to problematic
issues with PAIRs.

Looks like it fixes the weird issues i had in Sonic ?
But they could be unrelated. Doesn't hurt it seems i guess.
2019-03-08 01:28:23 +01:00
gameblabla
4446c28c8f
Update SDL port. Should be good now, hopefully. 2019-03-08 01:27:34 +01:00
gameblabla
e743d58453
Update RS-97 code. Triple buffering does not set VSYNC it seems so
disabling define. Also fix some minor issues.
2019-03-08 01:27:00 +01:00
gameblabla
301b10e2a6
Fixes Colecovision issues, also add support for keypad. (partial support for Consoles) 2019-03-07 20:37:49 +01:00
gameblabla
a4e59726a0
Fixes an oversight in ALSA's code. 2019-03-07 20:30:48 +01:00
gameblabla
7b738d83b2
Fixes issue with sdl_write_buffer return. 2019-03-07 20:30:07 +01:00
gameblabla
1110f1bbd5
Fixes Colecovision support and loading SMS bios.
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 ?
2019-03-07 19:32:17 +01:00
gameblabla
95075a712f
Fixes RS-97 port. Unforunately i had introduced issues without
actually trying those. It is fixed now.
2019-03-07 19:24:34 +01:00
gameblabla
b9f02b127f
Removing CrabZ80's core. (it was never working and i doubt it would be
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.
2019-03-07 19:03:53 +01:00
gameblabla
e2cbd65a2a
Removing Crypt related code from the ZIP code (it was never used
and shouldn't be used since it can be easily cracked, making it useless)
and fixing some minor issues.
2019-03-07 19:02:59 +01:00
gameblabla
d7f21a228d
Fixes minor issues in the platform-agnostic code.
Also removing duplicate header.
2019-03-07 19:02:29 +01:00
gameblabla
a4f685c6e5
Fixes minor issues in the sound code. 2019-03-07 19:02:05 +01:00
gameblabla
971624da7a
Fixes minor issues in MAXIM's PSG code. 2019-03-07 19:01:48 +01:00
gameblabla
8c5671ca66
Fixes minor issues in Crabemu's code. 2019-03-07 19:01:29 +01:00
gameblabla
90d5f94d90
Switch from Doubles to floats (should make it faster on embedded hardware)
and fixes code issues reported by Clang/GCC.
2019-03-07 19:00:34 +01:00
gameblabla
9f9c23e599
Update Sound ouput code.
Fixes minor issues but nothing major otherwise.
2019-03-07 18:59:47 +01:00
gameblabla
ceff32140c
Update the ports's specific code.
This fixes some code issues but the normal user should not notice anything.
2019-03-07 18:59:04 +01:00
gameblabla
0c18d2d915
Update EightyOne's core code. 2019-03-07 18:58:11 +01:00
gameblabla
cc098ce026
Switch Z80's core to MAME's z80 version of it.
This finally makes SMS Plus GX fully free software and should allow us in the future
to merge code from MAME.
2019-03-07 18:55:36 +01:00
gameblabla
dd9ca3804a
Disable Triple & Double buffering for the RS-97.
It conflicts with audio playback for now (even though that does not happen on PC).
Hopefully this gets solved in the future.
2019-02-19 18:28:52 +01:00
gameblabla
8a9c66e9bf
Bunch of fixes
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)
2019-02-19 10:38:00 +01:00
gameblabla
6f48b291ff
Fixing OSS sound code and fixing Z80's CPU core for undefined references.
We need to upload the whole buffer because we are directly
writing using write().
2019-02-19 08:15:39 +01:00
gameblabla
b5b274ffac
Huge update to SMS_Plus GX
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.
2019-02-19 07:06:06 +01:00
gameblabla
71261fabef
RS-97 : Refined port. Added IPK files to gitignore file. Also editing contributors files to include info on the proprietary z80 core (it's still inside and in use by the RS-97 port) 2019-02-07 06:40:23 +01:00
gameblabla
f713384574
PAP K3S, Bittboy changes 2019-02-02 10:02:11 +01:00