Old Regen pages

AamirM's Regen forum

Moderator: AamirM

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

Post by AamirM » Fri Apr 11, 2008 5:08 pm

Hi,

Yes, disassembly is broken in >0.5 versions of regen. I'll post the illegal address shortly.

stay safe,

AamirM

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

Post by AamirM » Fri Apr 11, 2008 5:11 pm

TmEE co.(TM) wrote:Hey AamirM,

FM sound is nice, but PCM/DAC sucks... you can use my sound demos and Fusion to compare. Only Fusion here has correct PCM/DAC emulation.
Yes the DAC is incorrect for sure. I have many of your cool demo programs to test. I have trying to fix it.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post by Sik » Fri Apr 11, 2008 5:12 pm

Some more remarks:
  • Whenever you find it put here the piece of code that belongs to it.
  • If you find it inside a bunch of subroutines that access to VDP (a lot of them unused), I know where it is :P
  • If you find it in code that reads the joypad... then what I've heard about NBA Jam 96 being able to access the joypads without bus requesting the Z80 seems to only work in that game :/

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

Post by AamirM » Fri Apr 11, 2008 5:25 pm

Hi,

Ok, here it is.

0x00ff0391 ori.b $#0, d0

It seems to be no where.

stay safe,

AamirM

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

Post by AamirM » Fri Apr 11, 2008 5:33 pm

Hi,

You can also try to initialize the address exception interrupt vector to some routine to handle that.
Sik wrote:If you find it in code that reads the joypad... then what I've heard about NBA Jam 96 being able to access the joypads without bus requesting the Z80 seems to only work in that game :/
It works although not recommended. I think many TmEE's program tries to do it and it works.

stay safe,

AamirM

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Post by Sik » Fri Apr 11, 2008 6:23 pm

AamirM wrote:Ok, here it is.

0x00ff0391 ori.b $#0, d0

It seems to be no where.AamirM
WTF, how did PC reach there?! The game never runs code from RAM. Also, ori.b #0, d0 is $0000 there, right? Because as far as I know, that very same instruction is the one that causes 3D games to crash in Genecyst (I wonder why couldn't they just use tst.b d0 in any case).

Oh, also here is the generic interrupt code... Yes, lame :P

Code: Select all

DummyInt:
    rte
Seriously, those errors shouldn't happen :/ And anyways, I'm customed to debug that way. I always have problems with debugging tools :\
AamirM wrote:You can also try to initialize the address exception interrupt vector to some routine to handle that.
OK, but does Regen emulate it? (I found the way to make the game work in Regen, apparently the debugger thingy affected all runs afterwards, even after I closed the emulator) Do any other emulators emulate it too? Because as far as I know, emulating it isn't quite common.
AamirM wrote:
Sik wrote:If you find it in code that reads the joypad... then what I've heard about NBA Jam 96 being able to access the joypads without bus requesting the Z80 seems to only work in that game :/
It works although not recommended. I think many TmEE's program tries to do it and it works.
The only problem was a scrambled scanline once in a while. Also, my code isn't using the Z80 for now due to lack of DAC usage anyways :P
Last edited by Sik on Fri Apr 11, 2008 6:58 pm, edited 1 time in total.

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 Apr 11, 2008 6:50 pm

AamirM wrote:It works although not recommended. I think many TmEE's program tries to do it and it works.
NONE of my stuff halts Z80 before reading controllers :twisted: no problems so far, so not gonna change anything.
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: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Apr 11, 2008 7:04 pm

some roms you might try (I noticed the same glitches in my emu, hopefully you can be better than me in fixing them :wink: ):

- Zero the Kamikaze Squirell (US version): some line glitches during first level in the sky (maybe this happens on real HW, i don't know, Kega is bad too)

- Striker (EUR version): line glitches during a match, I suspect something wrong with HV counters (only Kega runs it fine)



Also, I fund this test program from Charles Mc Donald useful when testing my modifications, Regen seems to fail at IO & VDP tests (right columns are results from real console):

http://web.archive.org/web/200212070826 ... emtest.zip

you can grab more test programs from the gold mine;)
http://web.archive.org/web/200212070826 ... uf.htm#gen

Zoomer
Interested
Posts: 14
Joined: Wed Apr 09, 2008 6:48 pm

Post by Zoomer » Sat Apr 12, 2008 1:27 am

Hi, it's me again. Measured fps on my system.
Window mode, 640x480, Superhq enabled, filters, stretch disabled, sound rate is 48000

Sonic 3D blast: 880 - 910 fps in menu
Zero Tolerance: 890 - 915 fps in game

Core2Duo e6600, 2gb ddr800 ram, GF8800gtx, Vista U x64.
It'll be very interesting to look at x64 for two core cpu version of ReGen :)
Good luck with your exams :wink:

TascoDLX
Very interested
Posts: 262
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Sat Apr 12, 2008 5:58 am

Sik wrote:
AamirM wrote:0x00ff0391 ori.b $#0, d0
WTF, how did PC reach there?
Here's how. There are a couple problems here.

First off, you're doing a word write to an odd address, which is in the subroutine at $0002F0 (right after the main loop). Specifically, here:

Code: Select all

00032A : 30fc 0011 : move.w #0x0011, (a0)+ ; a0 = 00ff038e
00032E : 10fc 0080 : move.b #0x80, (a0)+   ; a0 = 00ff0390
000332 : 30fc 0000 : move.w #0x0000, (a0)+ ; a0 = 00ff0391 !!!
There's your address error. The next problem is a little trickier.

The 68k pushes an exception stack frame and vectors to your exception handler. You're using RTE to get back, but it seems the MC68000 can't tell the difference between an interrupt exception and a bus/address error exception. (Exception handling was changed with the MC68010 and later processors.)

If you want a description of the stack frame, you can check the 68k manual, but, in short, RTE doesn't return to the previous PC; RTE returns to the bad write address, instead.

Bottom line: most games handle the address error by stalling (i.e., looping infinitely). Don't use RTE unless you know you can recover from the error.
AamirM wrote:Anybody using Regen please post the max framerate you are getting with 0.77 ...
Sonic 3D selection screen
~130 fps

Pentium 3 866 MHz (133 FSB!)
256 MB SDRAM @ 133 MHz
ATI All-in-Wonder Radeon 7200 AGP

Fear the beast! :P

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

Post by AamirM » Sat Apr 12, 2008 6:55 am

Hi,
Eke wrote:some roms you might try (I noticed the same glitches in my emu, hopefully you can be better than me in fixing them ):

- Zero the Kamikaze Squirell (US version): some line glitches during first level in the sky (maybe this happens on real HW, i don't know, Kega is bad too)

- Striker (EUR version): line glitches during a match, I suspect something wrong with HV counters (only Kega runs it fine)
About the Zero the Kamikaze Squirell, can anybody test it on a real Genesis?

About the Striker, I could not notice any line glitches in Regen. Can you post a screenshot?
This link is not working here. If anybody has it, can they please upload it somewhere (but not to rapidshare please) or mail it to me?
Sik wrote:OK, but does Regen emulate it? (I found the way to make the game work in Regen, apparently the debugger thingy affected all runs afterwards, even after I closed the emulator) Do any other emulators emulate it too? Because as far as I know, emulating it isn't quite common.
Yes it does. I don't know of any other emulator (Eke's emulator has it too now) that emulates it. TmEE' emulator detector program exploited this to detect emulator.
TascoDLX wrote:~130 fps

Pentium 3 866 MHz (133 FSB!)
256 MB SDRAM @ 133 MHz
ATI All-in-Wonder Radeon 7200 AGP

Fear the beast!
I have a 733Mhz P3 too and Regen runs around 45 fps on it. But I did not expect it to run decently on 866Mhz. But you have a nice AGP card too. I guess I'll have to modify the readme :).

stay safe,

AamirM

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

Post by Eke » Sat Apr 12, 2008 7:26 am

AamirM wrote: About the Striker, I could not notice any line glitches in Regen. Can you post a screenshot?
a screenshot won't show anything as the glitch is causing line "flickering" (don't know how to call this): precisely, the horizontal lines use to simulate the field perspective seem to be not fixed and shuttering

it's pretty obvious when you start playing a match (just continuously hit START from the beginning), Gens has the same behaviour btw
I'm using 0.77 version, maybe it has been somehow fixed in your current build

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sat Apr 12, 2008 8:51 am

TascoDLX wrote:First off, you're doing a word write to an odd address, which is in the subroutine at $0002F0 (right after the main loop). Specifically, here:

Code: Select all

00032A : 30fc 0011 : move.w #0x0011, (a0)+ ; a0 = 00ff038e
00032E : 10fc 0080 : move.b #0x80, (a0)+   ; a0 = 00ff0390
000332 : 30fc 0000 : move.w #0x0000, (a0)+ ; a0 = 00ff0391 !!!
I confirm that. I steped on the same rake, when did the shell for TFM player from Shiru. So, Gens have not implementation of exceptions, but Fusion (and seems the Regen) have it. So, it will be right put some simple exeption handler, wich for example just show on screen message, or do infinite loop.

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

Post by AamirM » Sat Apr 12, 2008 9:18 am

Hi,

Fusion does not have it. Otherwise Tiido's program would detect it as real hardware.

stay safe,

AamirM

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Sat Apr 12, 2008 10:43 am

AamirM wrote:Fusion does not have it. Otherwise Tiido's program would detect it as real hardware.
Hmm.. But Address Error exception is working. In debugger mode, when step by step running programm trying read word at odd address and goes at Address Error exception vector.

Locked