Old Regen pages

AamirM's Regen forum

Moderator: AamirM

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Feb 29, 2008 9:12 pm

While I care about license issues, I'm not about to make a fuss over it. It's the author's responsibility to enforce their selected license - not mine. Some authors are a bit more laid back about that sort of thing, so if they don't complain, why should I? :lol:

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sat Mar 01, 2008 1:52 pm

Hi,

This will be my last post on this subject. As I said I will be releasing the
sources when I think they are done and they will be really helpful for others.
Currently they are not. I still have to re-write many things using clean code.
Also the emulator is not complete. I still have things to add
(including Master System, SegaCD, 32X support). Yes, I have taken help from
other emulator sources like Gens but do remember it initially wasn't
open source too. In the meantime I am offering my help to anyone who wants it.

stay safe,

AamirM

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sun Mar 02, 2008 8:25 am

Hi,

Version 0.5 has just been uploaded. Download link in the first post as always.

stay safe,

AamirM

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sun Mar 02, 2008 10:04 am

cool, you are working fast and your emulator seems to be more and more accurate each time.

some games you might want to try:

- Chaos Engine, Soldier of Fortune (in-game graphics glitch)
- Double Clutch (intro text)
Those games need proper emulation of the VDP FIFO (vram writes latency)

- Bass Masters Classic Pro, Captain Planet & The Planeeters (alt version): those 2 games enable VDP mode 4 accidentaly then writes into vdp registers 12-23. Display is messed up if you don't discard those register writes as long as you are in mode 4.


Btw, could you explain more about the YM2612 improvment you made ?

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Sun Mar 02, 2008 12:05 pm

Hi,

Yep, Chaos Engine, Soldiers of Fortune and Double Clutch do have graphics glitches.
Implementing FIFO is next on my list. Could you please tell me more about the
VRAM write latency? FIFO is much more complex than I thought :)

About the Bass Masters Classic Pro(corrupt logo) and Captain Planet(sets to 40 cell mode)
I knew about that. It was fixed in version 0.3.

About the YM2612 improvement, somebody had reported that intro sound in Spiderman Animated Series
wasn't right. I looked into it and found that a certain instrument(specifically channel 3, operator 2
algorithm 4, feedback shift 10(feedback 4), and special mode on) wasn't playing correctly
(maximum total level selected). So under those conditions I set the total level of the
channel to 20(about 15 dB) and attack rate to 750 on write to register 0x40. I know that this is
certainly not the right solution, especially setting the attack rate, but the same person who reported the
problem said that it actually sounded better than Kega so I left it there. I will be investigating
this further as especially it seems that it has something to do with frequency.

stay safe,

AamirM

Tomy
Interested
Posts: 11
Joined: Sun Nov 26, 2006 12:23 pm

Post by Tomy » Sun Mar 02, 2008 12:31 pm

AamirM,

Can you make your emulator support this : http://www.box.net/public/rghr3mqbh4
It is Ultimate Mortal Kombat 3 Hack 13. (About 80M)

It has no protection, but mapped over address $800000.
It is $000000-$9A885F in length.

Detail here : http://umk3.hacking-cult.org/eng/index.htm

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sun Mar 02, 2008 1:49 pm

Hi,

Yep, Chaos Engine, Soldiers of Fortune and Double Clutch do have graphics glitches.
Implementing FIFO is next on my list. Could you please tell me more about the
VRAM write latency? FIFO is much more complex than I thought :)
during active display (not in vblank and display ON), the VDP has less time to handle write commands sent by the main CPU
there is a four word FIFO which store the DATA written by the CPU.
If the writes are done in a tight loop, the FIFO can be filled and the CPU will be halted if it try to write another data

About the timings, you can use similar ones as with DMA, just remember that VRAM accesses are byte based so any VRAM write (word access) in fact count for two accesses.

check the fifo_update() function I added in vdp.c for more details

About the Bass Masters Classic Pro(corrupt logo) and Captain Planet(sets to 40 cell mode)
I knew about that. It was fixed in version 0.3.

About the YM2612 improvement, somebody had reported that intro sound in Spiderman Animated Series
wasn't right. I looked into it and found that a certain instrument(specifically channel 3, operator 2
algorithm 4, feedback shift 10(feedback 4), and special mode on) wasn't playing correctly
(maximum total level selected). So under those conditions I set the total level of the
channel to 20(about 15 dB) and attack rate to 750 on write to register 0x40. I know that this is
certainly not the right solution, especially setting the attack rate, but the same person who reported the
problem said that it actually sounded better than Kega so I left it there. I will be investigating
this further as especially it seems that it has something to do with frequency.
:lol: it seeems we have been thinking the same way

http://www.spritesmind.net/_GenDev//for ... &start=255
there is a lot of games using this instrument that sound weird in emulation, Steve Snake probably know more about that one because his "HQ YM2612" option make those games sound correct... or maybe he is simply doing like us, which is actually only a "hack"

stranno
Newbie
Posts: 1
Joined: Sun Mar 02, 2008 2:03 pm

Post by stranno » Sun Mar 02, 2008 2:05 pm

Great one the 0.5, i've played VR and it looks nice now

Here is an HD video of 0.5 (VR of course)

http://blip.tv/file/710234

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sun Mar 09, 2008 5:12 pm

another bug I found recently in the genesis plus sourcecode which seems to be shared by Regen also:

->don't forget to update the internal Sprite Attribute Table when doing a VRAM fill... it fixes intro screen in Battletech

I tested some games that gave me some headache to be emulated properly and apparently not working correctly in your emu, here some tips:
- games that need accurate VINT/VBLANK timings: Outrunners, Dracula
- games that need accurate VDP HBLANK emulation: Legend of Galahad, Deadly Moves, Nigel Mansell's World Championship Racing (single line glitch otherwise)
- Combat cars need proper Vcounter values in 2-player mode (Interlaced 2 mode)

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Tue Mar 11, 2008 8:21 am

Eke wrote:another bug I found recently in the genesis plus sourcecode which seems to be shared by Regen also:

->don't forget to update the internal Sprite Attribute Table when doing a VRAM fill... it fixes intro screen in Battletech

I tested some games that gave me some headache to be emulated properly and apparently not working correctly in your emu, here some tips:
- games that need accurate VINT/VBLANK timings: Outrunners, Dracula
- games that need accurate VDP HBLANK emulation: Legend of Galahad, Deadly Moves, Nigel Mansell's World Championship Racing (single line glitch otherwise)
- Combat cars need proper Vcounter values in 2-player mode (Interlaced 2 mode)
Hi,

Thanks for reporting the problem in battle tech. I didn't knew about that. You can also notice this problem in HazeMD as that also emulates internal sprite attribute table. I will also look into the timing problems. Thanks again.

stay safe,

AamirM

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Mar 14, 2008 3:23 pm

you're welcome, i''m looking at your emu's status update with lot of interess
Game no Kanzume o Tokuyou won't run. It wants to write to ROM and also seems to use unused VDP control bits.
I have not found *right*(read without hack) way to run this game.
this one is indeed weird: Haze discovered that it wants ROM mapped as RAM to copy games programs in there, I thought it could be possible to have cart hardware that would enable ROM area writes (this seems to be a seganet compilation, I wonder if a real cartridge exist for this one)

If I remember well, the game also rely on the unused bits when reading the VDP status register to be correctly set (i.e top bits of the next 68k instruction) or it would hang at startup
Regen can now fool the "Emulator Detector" program made by Tiido. It can detect if his program is being
run on real Genesis or on an emulator. I could not find any emulator that is capable of fooling it...no not even Kega.
hehe, I looked a lot into this one some time ago but was never be able to find what the trick was... could you share it ?
sorry TmEE :oops:

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Mar 14, 2008 3:58 pm

my program just generates Address Error, a thing that was unemulated until Regen did it :)
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

AamirM
Very interested
Posts: 472
Joined: Mon Feb 18, 2008 8:23 am
Contact:

Post by AamirM » Fri Mar 14, 2008 4:13 pm

Hi,

@ Eke

I noticed it generated interrupt 3 on real hardware but not in emulated one so I found as TmEE co.(TM) said in the disassembly that it wrote 0xFFFF to adrress 0x1(odd address) so it would trigger address exception. In Musashi(since you also use it) you can define M68K_EMULATE_ADDRESS_ERROR and then it will work.

stay safe,

AamirM

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Mar 14, 2008 4:53 pm

There's some other ways to get things not working in emulators... like address wraping
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Mar 14, 2008 5:00 pm

In Musashi(since you also use it) you can define M68K_EMULATE_ADDRESS_ERROR and then it will work.
so simple I would never have thought about it :oops:

Image
yeah, give us more challenge !
:twisted:

PS: what is address wrapping ?

Locked