IVBeatz / genplus-gx

Automatically exported from code.google.com/p/genplus-gx
Other
0 stars 0 forks source link

Mega-CD support #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be cool to have mega CD suppot to play game like Dune, Road
Avenger... Maybe look at the code used by Notaz for his emulator Picodrive

http://notaz.gp2x.de/

Thanks for your hard work on this emulator ;)  

Original issue reported on code.google.com by Yod4zM...@gmail.com on 29 May 2009 at 7:10

GoogleCodeExporter commented 9 years ago
Your progress as always is amazing Eke, great work!  Can't wait to see a 
release  for this :) 

Original comment by chicor...@gmail.com on 14 Jun 2012 at 5:58

GoogleCodeExporter commented 9 years ago
Thanks for support.

@100: I would have no time doing and maintaining a proper windows port, though 
i always thought the Wii interface could easily be ported back (using mouse 
instead of wiimote) and this would be much nicer than those uniformized windows 
gui that all emulators seem to be using...

As for cheats, i don't think any cheat device existed for mega cd and i don't 
know any patch code either: the reason is probably that code can be executed 
from a lot of various places when mega cd is used and that memory is always 
switching from one side to another, depends on current memory mode or can only 
be accessed through banking . All in one, it makes very difficult for a 
cartridge to intercept all memory access and patch them properly, also the 
sub-cpu bus is only internal so not  "spyable", which leaves out the 
possibility of patching code on that side and kinda limits utility of such 
device.

Original comment by ekeeke31@gmail.com on 15 Jun 2012 at 6:46

GoogleCodeExporter commented 9 years ago
I finally fixed the last remaining issues with AH3 Thunderstrike / Thunderhawk:

- map was fixed by increasing the granularity of graphics operation processing: 
instead of processing all lines at once when the operation is started 
(inaccurate but more optimized), I now update the rendering on each CPU 
executed line, in regard to "real" timings (though exact timings are unknown 
for now). This was required as this game will start a graphics operation then 
write to Word-RAM and update the data needed by the graphic chip while it is 
rendering.

- corrupted "riverside" graphics  were solved by fixing a stupid bug with how 
stamp flipping was emulated: stamps (16x16 or 32x32 pixel patterns) can be 
flipped  horizontally (mirrored) and/or at 90, 180, 270° by setting a few bits 
in the corresponding stamp table entry and I was simply not handling these bits 
correctly.

I also took some time to add support for Mode 1: in this mode, the main CPU 
boots from an inserted cartridge instead of booting from the CD as it usually 
does. There is actually two kind of Mode 1: 

1) in the first one, the main CPU still boots from the CD unit internal Boot 
ROM (what people like to call "BIOS") but the BIOS (maybe not all versions ?) 
can detect a bootable cartridge is inserted and jump to it instead of trying to 
boot a CD.

2) in the second one, the cartridge outputs a signal to the console so that the 
main CPU will directly boot from that cartridge (it's actually like what all 
Genesis games are doing). In this mode, the internal Boot ROM and the normally 
accessible RAM is still accessible (from $400000-$7FFFFF instead of 
$000000-$3FFFFF as usual), so cartridge can access CD hardware.

The latter is actually required by a few Genesis programs to work, namely Flux 
and Wonder Library. These were actually some of the few remaining known ROM 
dumps that were not compatible with Genesis Plus GX because of lack of Sega CD 
support, so they are now supported by the emulator, even if there isn't much to 
do with them without proper CD images.

Original comment by ekeeke31@gmail.com on 16 Jun 2012 at 2:04

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ekeeke31@gmail.com on 16 Jun 2012 at 2:56

Attachments:

GoogleCodeExporter commented 9 years ago
I quickly added save-state support for CD games. I'm not sure what was so 
difficult that PC emulators did not supported save-state until very recently 
(actually I think only Kega has 100% working save-state support so far), so 
maybe I'm missing something, I don't know. State size is actually quite big 
with CD hardware state incorporated (almost 1MB) but it works perfectly fine 
with the few games I tested.

So, since I'm pretty much satisfied with the current state of my core now, I 
guess a release should not be too long, only need to incorporate it in the Wii 
port and add the necessary GUI adjustments for Mega CD specific stuff.

Original comment by ekeeke31@gmail.com on 17 Jun 2012 at 7:14

GoogleCodeExporter commented 9 years ago
Thank you :) save games = cheats :) if it is posible do not compress the 
savegame files. With an hex editor + time you can cheat mega cd games changing 
the values on save file.

Original comment by ferran...@hotmail.com on 18 Jun 2012 at 1:29