Interesting bugs in old games
Moderator: Moderators
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Interesting bugs in old games
I've spent about 20 hours on games that don't seem to work right in my emulator, and most of the problems have come down to one thing.
Games using unitialised memory.
Poker and AE are two examples.
In AE PAL at least, the screen is sometimes offset to the left and up incorrectly all due the intialisation code calling the Kernal ROM to get the screen base, but not initialising the memory the kernel uses to 0 before it starts. So the screen base ends up being something like 1E20 instead of 1E00. Certain random values that are in memory cause it to fail on a real Vic20 sometimes, but on an emulator which generally does not have random memory on startup it can consistently fail, or consistently succeed.
You can reproduce in Vice 2.1 by loading ae, starting the game, and then resetting.
Another example is Poker. Sometimes the F1 key to start doesn't work, I've tested this on my Vic20 by turning it on and off heaps. Turns out it has the same problem, certain random values in memory on startup cause the F1 key not to work.
King Tut, and Xeno are another example, I press any key with the uninitialised memory set to certain values and the games crash.
All lots of fun really!
Games using unitialised memory.
Poker and AE are two examples.
In AE PAL at least, the screen is sometimes offset to the left and up incorrectly all due the intialisation code calling the Kernal ROM to get the screen base, but not initialising the memory the kernel uses to 0 before it starts. So the screen base ends up being something like 1E20 instead of 1E00. Certain random values that are in memory cause it to fail on a real Vic20 sometimes, but on an emulator which generally does not have random memory on startup it can consistently fail, or consistently succeed.
You can reproduce in Vice 2.1 by loading ae, starting the game, and then resetting.
Another example is Poker. Sometimes the F1 key to start doesn't work, I've tested this on my Vic20 by turning it on and off heaps. Turns out it has the same problem, certain random values in memory on startup cause the F1 key not to work.
King Tut, and Xeno are another example, I press any key with the uninitialised memory set to certain values and the games crash.
All lots of fun really!
Last edited by matsondawson on Thu Sep 10, 2009 7:03 pm, edited 2 times in total.
- Mayhem
- High Bidder
- Posts: 3027
- Joined: Mon May 24, 2004 7:03 am
- Website: http://www.mayhem64.co.uk
- Location: London
I have to ask those who've tried it so far, are both of these issues fixed in the beta of the new Vice?
Yeah, Poker wouldn't work properly in GB20, the F1 button refused to respond. And AE is offset on the screen. I think I asked NBLA to come up with workarounds to get them to function correctly, but it would be nice to have to pure cart dumps operate 100% in emulation too.
Yeah, Poker wouldn't work properly in GB20, the F1 button refused to respond. And AE is offset on the screen. I think I asked NBLA to come up with workarounds to get them to function correctly, but it would be nice to have to pure cart dumps operate 100% in emulation too.
Lie with passion and be forever damned...
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
I notice also that the Kernal Tape load code does a: BIT $B0E6
Which has neither ram or peripheral attached to it, I wonder what its purpose is. If you look at FA2D in the kernel you'll see the instruction.
I think instructions following it remove any effect it might have.
Edit:
I figured it out, B0 E6 is BCS *-something
It must be a timing thing, BIT $B0E6 is mean to have no effect, unless you branched into the middle of it.
Which has neither ram or peripheral attached to it, I wonder what its purpose is. If you look at FA2D in the kernel you'll see the instruction.
I think instructions following it remove any effect it might have.
Edit:
I figured it out, B0 E6 is BCS *-something
It must be a timing thing, BIT $B0E6 is mean to have no effect, unless you branched into the middle of it.
- Mike
- Herr VC
- Posts: 4846
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Code: Select all
.C:fa25 A5 92 LDA $92
.C:fa27 F0 07 BEQ $FA30
.C:fa29 30 03 BMI $FA2E
.C:fa2b C6 B0 DEC $B0
.C:fa2d 2C E6 B0 BIT $B0E6
.C:fa30 A9 00 LDA #$00
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
-
- Vic 20 Afficionado
- Posts: 350
- Joined: Tue Apr 14, 2009 8:15 am
- Website: http://wimbasic.webs.com
- Location: Netherlands
- Occupation: farmer
Re: Interesting bugs in old games
Both games seems to work properly on Mega-Cart (PAL machines), I'm wrong ?matsondawson wrote:Poker and AE are two examples.
Mega-Cart: the cartridge you plug in once and for all.
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm