Super Mario Bros on the Genesis

Announce (tech) demos or games releases

Moderator: Mask of Destiny

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Jul 06, 2010 3:59 pm

Tasco, here's a runthrough of your second patch.

http://www.youtube.com/watch?v=6_DIdJrZsN8

Not really any changes I see audio wise. Graphically there are some things different, including some what looks to be VSync tearing.

I plan to get a capture card for my Mac today and will try to post some high quality 60fps videos..

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

Post by Chilly Willy » Tue Jul 06, 2010 5:21 pm

V2 ips: Still some glitches, but it doesn't look quite as bad. Still won't reset.

Mairtrus
Newbie
Posts: 9
Joined: Wed Jun 24, 2009 12:52 pm

Post by Mairtrus » Tue Jul 06, 2010 9:34 pm

hey guys, you don't need to patch my game, I can do it by myself :D
But, seriously, I have a revision ready to be launched who SHOULD works on the real thing: it fix some bugs, now initialize the controlers, the H40 cheat is gone(useless adition) but now you can set the interlace mode (as requested localh), and the checksum is gone, because makes no sence to have it (anyone can hack it), but those bugs in the real hardware really worry me. In the next revision, I will implemet a buffer for avoid the VRAM reads, but for now, what solutions I have? Should I put some NOPs between each "adress set" and "read" instructions?

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

Post by Eke » Tue Jul 06, 2010 9:49 pm

well, patches were more a quick way to test if stuffs are really handle on real hardware as we thought it was, your ROM is also very interesting as it can help improving accuracy of emulators :wink:

Regarding VRAM access, here's what official tech bulletins are saying:

Image

Hope that helps, good luck for next releases, I'm sure all the bugs can be ironed out and as you can see, there is a lot of interest for this port !

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

Post by TascoDLX » Wed Jul 07, 2010 12:32 am

Where was that memo hiding? :P

So it seems the delay belongs after the last read. If you reorganize the code, you probably don't need any artificial delays (NOPs or such) -- just move anything you can between the last read and setting the address for the next write. But, using a buffer is a wonderful idea.

And, before I forget, a couple more bugs I spotted:

* In DigitsMathRoutine, OperMode is read from the wrong location (ROM instead of RAM). Probably just a typo. The effect is rather interesting, though.

* In TopScoreCheck at around 'bcc NoTopSc', bad flag check (because SUBQ alters the X flag).

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

Post by Chilly Willy » Wed Jul 07, 2010 4:33 am

TascoDLX wrote:Where was that memo hiding? :P
It's part of the MCD SDK and docs, under misc. The same tech memo also describes how accessing areas not defined for the MCD or MD may not assert DTACK and therefore hang the processor.

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

Post by TascoDLX » Fri Jul 09, 2010 8:47 am

One last shot: hackpatch v3. Only fixes for hardware in this one.

Sorry, couldn't help myself. :wink:

I believe the tearing evildragon pointed out is caused by updating the scroll values midscreen. I didn't bother myself with that.

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Fri Jul 09, 2010 9:11 am

hey ! very nice.
no bug in my MD2+Megacart.
Now all works fine , the only bug i found is the reset.

Very Thanks :twisted:

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

Post by Eke » Fri Jul 09, 2010 9:29 am

TascoDLX wrote:One last shot: hackpatch v3. Only fixes for hardware in this one.

Sorry, couldn't help myself. :wink:

I believe the tearing evildragon pointed out is caused by updating the scroll values midscreen. I didn't bother myself with that.
cool, what fixes did you add ?

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Fri Jul 09, 2010 10:35 am

actually there is no graphical glitches in real hardware with this V3 patch :P

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Fri Jul 09, 2010 2:09 pm

Can't wait to get home and flash my cart. :D

Mairtrus
Newbie
Posts: 9
Joined: Wed Jun 24, 2009 12:52 pm

Post by Mairtrus » Sat Jul 10, 2010 12:16 am

I'm interested too in know what you did this time. I'm ready to release a new version, but I will wait until your explanation.

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

Post by TascoDLX » Sat Jul 10, 2010 4:17 am

I basically just rearranged the VRAM code according to the tech memo: plenty of time between the last read and next setting the control reg. Didn't do much more than reorder the instructions, really.

I made sure to spend at least 116 CPU clocks following each read sequence (consecutive reads are not a problem, so says the doc). To get there, I had to insert a very small busy loop. Don't know if that was absolutely neccessary, but I just assumed it was.

As suspected, reading VRAM immediately after writing VRAM is perfectly OK. In fact, here's a piece of it:

Code: Select all

MOVE.L    D6,$0004(A6) ; A6 = $C00000
MOVE.L    D3,(A6)
MOVE.L    D4,(A6)
MOVE.L    D7,$0004(A6)
MOVE.L    (A6),D3
MOVE.L    (A6),D4
Maybe a bit extreme, but apparently it works.

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

Post by Chilly Willy » Sat Jul 10, 2010 5:48 am

TascoDLX wrote:One last shot: hackpatch v3. Only fixes for hardware in this one.

Sorry, couldn't help myself. :wink:

I believe the tearing evildragon pointed out is caused by updating the scroll values midscreen. I didn't bother myself with that.
Works great on my Neo Myth. Nice work. :D

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Sat Jul 10, 2010 8:58 am

And now we wait for Mairtrus to come out with a proper v2 release, with an improved palette (and I hope he switched the A and B buttons :))

Post Reply