Old Regen pages

AamirM's Regen forum

Moderator: AamirM

Locked
Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Sat Apr 12, 2008 11:07 am

Anybody using Regen please post the max framerate you are getting with 0.77 ...
Sonic 3D selection screen
342fps (pressing space, right?)
P4 3.0ghz
Crap integrated 82865G INtel Graphic controller with shared mem
Crap integrated Realtek AC97 audio
Win98 SE

King Of Chaos
Very interested
Posts: 273
Joined: Fri Feb 29, 2008 8:12 pm
Location: United States

Post by King Of Chaos » Sat Apr 12, 2008 4:19 pm

AamirM wrote:Fusion does not have it. Otherwise Tiido's program would detect it as real hardware.
Only because Kega doesn't and won't support interrupts that occurs when you try to access a privileged instruction in user mode. No Genesis games even use user mode. ;)

As Snake himself told me, there's no point dropping to user mode when you have full access in Kega. Because of that, the emulation detection ROM will always "fail" in Kega when the ROM tries to trigger interrupt 3, even though it's honestly irrelevant if it passes or not.

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

Post by Sik » Sat Apr 12, 2008 4:51 pm

HardWareMan wrote:
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.
WTF again:

Code: Select all

    move.w  #17, (a0)+                  ; Frame time
    move.b  #ActionStand, (a0)+         ; Action
    move.b  #128, (a0)+                 ; Energy
    move.w  #0, (a0)+                   ; Gravity
o_O

(maybe I accidentally sent a non-working version... oh, well)

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

Post by HardWareMan » Sat Apr 12, 2008 6:28 pm

Code: Select all

ROM:000002F0 ; =============== S U B R O U T I N E =======================================
ROM:000002F0
ROM:000002F0
ROM:000002F0 sub_2F0:                                ; CODE XREF: Start+3Cp
ROM:000002F0                 movem.l d0-d1/a0-a1,-(sp)
ROM:000002F4                 lea     (word_FF0378).l,a0
ROM:000002FA                 move.w  #$B0,(a0)+ ; '-'
ROM:000002FE                 move.w  #$C7,(a0)+ ; '¦'
ROM:00000302                 move.w  #0,(a0)+
ROM:00000306                 move.w  #0,(a0)+
ROM:0000030A                 move.w  #$11,(a0)+
ROM:0000030E                 move.b  #0,(a0)+
ROM:00000312                 move.b  #$80,(a0)+
ROM:00000316                 move.w  #0,(a0)+
ROM:0000031A                 move.w  #$150,(a0)+
ROM:0000031E                 move.w  #$C7,(a0)+ ; '¦'
ROM:00000322                 move.w  #1,(a0)+
ROM:00000326                 move.w  #0,(a0)+
ROM:0000032A                 move.w  #$11,(a0)+ <<<!!!
ROM:0000032E                 move.b  #$80,(a0)+ <<<!!!
ROM:00000332                 move.w  #0,(a0)+   <<<!!!
ROM:00000336                 lea     ($51C).l,a1
ROM:0000033C                 movea.l off_526-unk_51C(a1),a1
ROM:00000340                 lea     (unk_FF0000).l,a0
ROM:00000346                 moveq   #$F,d1
ROM:00000348
ROM:00000348 loc_348:                                ; CODE XREF: sub_2F0+5Aj
ROM:00000348                 move.w  (a1)+,(a0)+
ROM:0000034A                 dbf     d1,loc_348
ROM:0000034E                 lea     ($51C).l,a1
ROM:00000354                 movea.l off_52A-unk_51C(a1),a1
ROM:00000358                 moveq   #$F,d1
ROM:0000035A
ROM:0000035A loc_35A:                                ; CODE XREF: sub_2F0+6Cj
ROM:0000035A                 move.w  (a1)+,(a0)+
ROM:0000035C                 dbf     d1,loc_35A
ROM:00000360                 movem.l (sp)+,d0-d1/a0-a1
ROM:00000364                 rts
ROM:00000364 ; End of function sub_2F0
Sik wrote:(maybe I accidentally sent a non-working version... oh, well)
I would say - I am confident in that.

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

Post by Sik » Sat Apr 12, 2008 7:19 pm

No need to disassembly :P

Code: Select all

;----------------------------------------------------------------------------

;--------------------------;
; Initializes both players ;
;--------------------------;

InitPlayers:
    movem.l d0-d1/a0-a1, -(sp)

;------------------------------------;
; Where the player data is stored =P ;
;------------------------------------;

    lea     (RAMPlayer1Data), a0

;---------------------;
; Initialize player 1 ;
;---------------------;

    move.w  #176, (a0)+                 ; X coordinate
    move.w  #199, (a0)+                 ; Y coordinate
    move.w  #%0, (a0)+                  ; Flags
    move.w  #0, (a0)+                   ; Frame
    move.w  #17, (a0)+                  ; Frame time
    move.b  #ActionStand, (a0)+         ; Action
    move.b  #128, (a0)+                 ; Energy
    move.w  #0, (a0)+                   ; Gravity

;---------------------;
; Initialize player 2 ;
;---------------------;

    move.w  #336, (a0)+                 ; X coordinate
    move.w  #199, (a0)+                 ; Y coordinate
    move.w  #%1, (a0)+                  ; Flags
    move.w  #0, (a0)+                   ; Frame
    move.w  #17, (a0)+                  ; Frame time
    move.b  #ActionStand, (a0)+         ; Action <-- MISSING LINE IN THAT BUILD x_X
    move.b  #128, (a0)+                 ; Energy
    move.w  #0, (a0)+                   ; Gravity

;-------------------------------;
; Load the palette for player 1 ;
;-------------------------------;

    lea     (DatGeisha), a1
    move.l  10(a1), a1
    lea     (RAMPalette), a0
    moveq   #15, d1
InitPlayersLoadPal1P:
    move.w  (a1)+, (a0)+
    dbf     d1, InitPlayersLoadPal1P

;-------------------------------;
; Load the palette for player 2 ;
;-------------------------------;

    lea     (DatGeisha), a1
    move.l  14(a1), a1
    moveq   #15, d1
InitPlayersLoadPal2P:
    move.w  (a1)+, (a0)+
    dbf     d1, InitPlayersLoadPal2P

;-------------------;
; End of subroutine ;
;-------------------;

    movem.l (sp)+, d0-d1/a0-a1
    rts

;----------------------------------------------------------------------------
Anwyays, two things:
  1. Add scrolling code tags, please :/
  2. Stop talking about the game in this topic, I'll make another topic for it now :/

notaz
Very interested
Posts: 193
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Sat Apr 12, 2008 7:35 pm

HardWareMan wrote:
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.
Fusion has a debugger??
King Of Chaos wrote:
AamirM wrote:Fusion does not have it. Otherwise Tiido's program would detect it as real hardware.
Only because Kega doesn't and won't support interrupts that occurs when you try to access a privileged instruction in user mode. No Genesis games even use user mode. ;)

As Snake himself told me, there's no point dropping to user mode when you have full access in Kega. Because of that, the emulation detection ROM will always "fail" in Kega when the ROM tries to trigger interrupt 3, even though it's honestly irrelevant if it passes or not.
Wrong, this is a different thing. We are not talking about privilege violation, it's about the address error. Also, it's not "interrupt 3" (which would be exception vector 27), it's "exception vector 3". Please stop posting misinformation in this and other forums.

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

Post by Sik » Sat Apr 12, 2008 7:46 pm

And you're wrong too, what you mean with "interrupt 3" is "interrupt request 3" (IRQ3). Interrupt and exception are the same thing in this case. People tend to say interrupt when talking about an expected trigger and exception when talking about an unexpected one (errors), but they're interchangeable really.

So King of Chaos is right in this case. Interrupt (vector) 3 and exception vector 3 are the same thing.

King Of Chaos
Very interested
Posts: 273
Joined: Fri Feb 29, 2008 8:12 pm
Location: United States

Post by King Of Chaos » Sat Apr 12, 2008 7:49 pm

notaz wrote:
HardWareMan wrote:
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.
Fusion has a debugger??
Open Fusion's executable in ResHacker and look for yourself.

notaz
Very interested
Posts: 193
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Sat Apr 12, 2008 8:29 pm

Sik wrote:And you're wrong too, what you mean with "interrupt 3" is "interrupt request 3" (IRQ3). Interrupt and exception are the same thing in this case. People tend to say interrupt when talking about an expected trigger and exception when talking about an unexpected one (errors), but they're interchangeable really.
I wonder why they do that then, official M68k docs and wikipedia don't. Also it becomes ambiguous this way, for example when you say "interrupt 4", how do I know what you mean, illegal instruction exception or H-int in MD case?
King Of Chaos wrote:
notaz wrote: Fusion has a debugger??
Open Fusion's executable in ResHacker and look for yourself.
I know about that, but I thought that suff was not functional. I guess I should have checked it out first.

EDIT: ok I've patched fusion to load debug menu, and guess what, most options do nothing. Some of them do random stuff like resetting game or starting SegaCD, nothing like HardWareMan was talking about.
Last edited by notaz on Sat Apr 12, 2008 9:11 pm, edited 1 time in total.

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

Post by Sik » Sat Apr 12, 2008 8:49 pm

notaz wrote:
Sik wrote:And you're wrong too, what you mean with "interrupt 3" is "interrupt request 3" (IRQ3). Interrupt and exception are the same thing in this case. People tend to say interrupt when talking about an expected trigger and exception when talking about an unexpected one (errors), but they're interchangeable really.
I wonder why they do that then, official M68k docs and wikipedia don't. Also it becomes ambiguous this way, for example when you say "interrupt 4", how do I know what you mean, illegal instruction exception or H-int in MD case?
Depending how you're talking, really. Technically it's exception 4. H-int would be IRQ4 really.

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

Post by HardWareMan » Sun Apr 13, 2008 4:11 pm

You confuse software and hardware interrupts. All vector table is contain addresses for interrupt. But some vectors used for internal hardware interrupts (i.e. exceptions and reset), some for external interrupts (really "interrupt" by external hardware request, analog for "IRQn" for PC) and the remaining for "Software" interrupts (for simple subroutine calls).

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

Post by Eke » Wed Apr 16, 2008 8:17 am

AamirM wrote: 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?
AamirM
effectively, the link seem to be broken

does the ones on this page work better?
http://web.archive.org/web/200306040844 ... gastuf.htm

anyway, I uploaded the program http://www.2shared.com/file/3151350/de3 ... mtest.html

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

Post by AamirM » Wed Apr 16, 2008 3:45 pm

Hi,
Eke wrote:anyway, I uploaded the program http://www.2shared.com/file/3151350/de3 ... mtest.html
Thank you so much. But Regen does not fail at any thing as you said before. Even in 0.77. About the game problems:

1) Striker : Yup, I noticed the screen flickering (I was running wrong version before). But it is fixed in latest 0.8 beta (not the one I posted here). I ran the SDL version of your emu (I had to do some fixes before it could run :)) and the thing I noticed was that your H counter values are a bit higher (on average 15 - 30 higher) than what latest Regen 0.8 was returning.

2) Zero the Kamikaze Squirrel : Yes, there is little flickering in the sky and is still not fixed in latest Regen. I hope it happens on real hardware too :). Can anybody check please?

BTW, My exams finished today :D so I now have resumed work on Regen and just finished up AVI recording support and ROM browser. Cheat searching and editing shouldn't take much time but I guess we'll see.

stay safe,

AamirM

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

Post by Eke » Wed Apr 16, 2008 6:06 pm

look at this...

Image



this make me think: try Time Killers... it doesn't like when you return 0x00 in the low byte of $A11100...
charles mc donald stated that even byte is always 0x00 when reading the unused addresses but I can not see why, it seems more logical to me to return the whole prefetched data (generally, the next instruction to be decoded)

anyway, if you don't mask the low byte with 0x00, you will notice that Time Killer now works ;)

1) Striker : Yup, I noticed the screen flickering (I was running wrong version before). But it is fixed in latest 0.8 beta (not the one I posted here). I ran the SDL version of your emu (I had to do some fixes before it could run Smile) and the thing I noticed was that your H counter values are a bit higher (on average 15 - 30 higher) than what latest Regen 0.8 was returning.
:?:
what SDL version are you talking about ? I only use a private DOS version for betatesting... or did you succeed in compiling my sourcecode with SDL ?

btw, what did changed between 0.77 and your current 0.8 ?

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

Post by AamirM » Wed Apr 16, 2008 6:30 pm

Hi,

I managed to get your SDL version working (unused/win directory). I also compiled the DOS version (because it seems it has sound) but it crashes.

Here is what I get when I run memtest in Regen 0.77:

Image

In current 0.8 the timing and event system was totally rewritten which is more accurate.

stay safe,

AamirM

Locked