I've been working on a fork of Gens for the past few months. The main improvements are massive source code overhauls and cleanups, as well as some feature additions. The current release of Gens/GS is Milestone 6, and is available here: Gens/GS New features coming soon in Release 7: Versioning scheme changed from "Milestone" to "Release" due to several Microsoft fanboys who insist that only Microsoft has the "one true versioning system", and spread lies that Gens/GS was pre-alpha since it used the "Milestone" designation. External plugin support (*.dll/*.so), based on the MDP v1.0.0 specification. Improved Game Genie plugin. "Sonic Gens" plugin, based on a hack of Gens by LOst. "VDP Layer Options" plugin, which lets you disable layers and swap layer priorities. New renderers: EPX, EPX Plus, Super Eagle, Super 2xSaI. Built-in copy of the reverse-engineered 32X firmware by DevSter. Improved joystick support. (The Linux/SDL version now supports up to 128 axes, 256 buttons, and 64 POV hats. The Windows version supports the maximum number that DirectInput allows, which I can't recall offhand.) Redesigned Controller Configuration dialog. It now shows the current configuration for controllers, and it lets you configure one button at a time. Improved Teamplayer/4-Way Play support. (It still doesn't work on all games that support it, but it's better than before.) WAV dumping support has been reimplemented. (It was dropped in the original Gens/Linux due to reliance on Win32-specific APIs.) Two VDP bugs fixed: Zero-length DMA is now correctly handled as 65,536 bytes, and VDP DMA now wraps on 128K boundaries. (The 128K wrap fix isn't perfect, but it's much better than it was before.) ROM History now saves the name of ROM files selected from within multi-file archives. Initial support for the "Palette Select" bit in VDP register 0. If it's cleared, only the LSB for each color component in CRAM is used. Not very useful, but more accurately simulates the actual hardware. SRAM can now be disabled in the Options menu. This fixes Puggsy. Planned for Release 8 or later: libcdio integration for improved, cross-platform physical CD-ROM support and BIN/CUE support. mdZ80 port to C. ZOMG savestate format. Complete separation of UI from emulation code, resulting in libgens.so, gens-gtk2, gens-win32.exe, gens-qt4, etc. EDIT: Added stuff planned for Release 8 or later.
Just checked and Gens emulates this bug. Are you sure it isn't emulated or it got removed at some time I don't know? Or there's another sprite priority bug I'm not aware of?
You actually mentioned it in #retro: Code (Text): <+Sik> See, there's a priority flag for each tile in the plans and each sprite <+Sik> However, it only works between planes. Sprites are ordered by the chain list. <+Sik> So a sprite with low priority flag can still appear over one with a high priority flag. <+Sik> Guess what happens when you have that situation and it's mixed with a high priority in the scroll planes. <+Sik> Hint: put a green block in Sonic 1 in the overground areas. Put it into the lava so it floats on it. Wait until it collisions with a platform... So that bug *is* emulated correctly in Gens?
Yep, I checked it as soon as I saw the post and it was emulated. EDIT: quick way to check if it's emulated, try this: http://www.fileden.com/files/2006/12/22/543510/vdpbug.PNG Use debug mode to place the green block, push it onto the lava and see what happens =P EDIT 2: yes, I know that screenshot is from Fusion, I just wanted to show how it looks with the bug. It does the same thing on Gens, but I wasn't going to make another screenshot just to change the titlebar =P
Yeah, I just tested it on my Gens codebase and the bug is, in fact, emulated correctly. I crossed it off the list.
Okay, I'm definitely going to download this Gens edition if it has overclocking, Megasis's desynchronizing is getting moronic.
Could you also Hack in support for ROMS over 4 MB? It's just I want to play that Ultimate Mortal Kombat Trilogy hack with a current (ish) version of GENS.
Gens doesn't handle vram overwriting properly and does things that are not allowed on hardware. Therefore Gensmade hacks don't follow the correct hardware standards and give garbled object gfx on Kega or hardware.
D'oh, I was asking for the exact technical reason of the overwrite, not why there's a bug in the hacks =P
UMK Trilogy uses stuff not found on the actual hardware, so I won't be implementing it. Specifically, it uses a non-bankswitched ~10MB ROM, which is impossible on the actual hardware. There is the official Sega bankswitching system though, which I think Gens already supports. The official bankswitching system supports up to 32MB ROM, but requires the program to be specifically coded to use it. The only game I can think of that uses this bankswitching method is Super Street Fighter II, which has a 40Mb (5MB) ROM.
Phantasy Star 4 uses it to access SRAM too, because the ROM is 4MB and there isn't any space for the SRAM address. EDIT: fix Z80 bug =P For some reason, if I access the joypads, the Z80 starts running even if I don't send the command (I don't do so because I'm not using it). This leads to another issue that in the end causes the program to crash. This doesn't happen on real hardware.
The bug in S2 Delta, S2 Long Version etc. is caused by a DMA of length 0, which apparently does nothing on Gens but screws stuff up on Kega and real hardware. I'm quoting a post of Jman's below which explains the problem and gives its solution:
Oh, that bug =P Fix: check the DMA length after moving each word, not before doing so =] But I'm assuming it emulates the DMA the proper way. If everything is loaded directly, bad luck there D=
I think I may have located this bug. Can you post a test ROM that will indicate if the Z80 is running after it reads the gamepad? Code (Text): mem_m68k.asm, line 1450 xor ecx, ecx mov ah, [Z80_State] mov dword [Controller_1_Counter], ecx test al, 1 mov dword [Controller_1_Delay], ecx mov dword [Controller_2_Counter], ecx mov dword [Controller_2_Delay], ecx jnz short .desactived test ah, 2 jnz short .already_actived or ah, 2 push edx mov [Z80_State], ah Note that it enables the Z80 after reading the controller counters. I'm not sure if this is the correct thing, but a test ROM would help me test this.
And how many games took advantage of it? =/ http://www.joystiq.com/2008/08/21/see-tige...the-jesus-shot/ I know it's off-topic, but you just made me remind of that. Best example of that phrase ever =P Also reminds me of Microsoft >_>
There are quite a few. I know Sonic 3D Blast depends on on it, also see your other thread for another example.