Blinky Posted October 15, 2004 Share Posted October 15, 2004 The ORG for bank 2 is wrong. $2000 is TIA address space. use $3000 instead. Personally I prefere $D000 and $F000 for ORGs Because there are more '1' bits in it (all bits in an empty EPROMs are '1' and every '0' bit need to be programmed). Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 15, 2004 Share Posted October 15, 2004 The ORG for bank 2 is wrong. $2000 is TIA address space. use $3000 instead. Personally I prefere $D000 and $F000 for ORGs Because there are more '1' bits in it (all bits in an empty EPROMs are '1' and every '0' bit need to be programmed). When I used $3000, it created a 12k bin that didn't work. I'm using RORG's paired with ORG's to compile the binary. With the RORG's I use the $D000 and $F000 in the first and second banks. Quote Link to comment Share on other sites More sharing options...
Kroko Posted October 15, 2004 Share Posted October 15, 2004 Well, i can't find any problems. All 3 versions work just fine on my cart. I switched on and off about 25 times for each version and they always start fine ... Can you explain a bit more detailed what happens on your device ? Kroko Quote Link to comment Share on other sites More sharing options...
Blinky Posted October 15, 2004 Share Posted October 15, 2004 Now Didn't I make a fool out of myself I mixed up the ORG/RORG. sorry for that. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 15, 2004 Share Posted October 15, 2004 Blinky's comments made me look over my ORG and RORG tags again, and I found that I mislabelled one RORG tag as an ORG tag. new binary 8kha2_v09.zip Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 15, 2004 Share Posted October 15, 2004 Well, i can't find any problems. All 3 versions work just fine on my cart. I switched on and off about 25 times for each version and they always start fine ... Can you explain a bit more detailed what happens on your device ? Kroko I don't have immediate access to EPROMS or a burner, so I don't know. The person who tested it used real hardware, AFAIK. I'm just using the emulators, which run just about anything you throw at them. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 16, 2004 Share Posted October 16, 2004 Here's what is still happening: "Well, I get the exact same reaction from all three of your most recent bins. Here's exactly what happens. 95% of the time, the EPROM works fine on the first try. If I take the cart out and put it back in, about half of the time the screen garbles. The ghost stays constant in the back, but the lettering blinks on the left side and doesn't show up on the right side. Also, random ghosts blink on the screen. I can get into the first and second games, but the dot is split in two and all of the maps are different. The game hangs if I try to get to the third game. If I take the cart out and insert it again after the garbled screen, the cart works again about half of the time. Thoughts?" Quote Link to comment Share on other sites More sharing options...
Kroko Posted October 16, 2004 Share Posted October 16, 2004 hm ... not really but could you try to make a little delay loop before you do the first bankswitching ? Give the console and the cartridge a little time before you do the first bankswitch after startup. Quote Link to comment Share on other sites More sharing options...
Blinky Posted October 16, 2004 Share Posted October 16, 2004 Try using the same opcode after the bank switching in both banks. Look through the source for LD instructions that are missing the # sign. Quote Link to comment Share on other sites More sharing options...
Kroko Posted October 16, 2004 Share Posted October 16, 2004 Try using the same opcode after the bank switching in both banks. I still think its a problem that only occurs at startup. A wrong initialisation of something. I don't think the bankswitching itself has a problem, or it would crash all the time. So its most likely that some timing issues of the console or the cratridge that can sometimes happen at startup are the problem. I think using the same vectors in both banks (like described above) is something that could help, in case the VCS is fetching the reset vector from different banks during startup of the cartridge. Look through the source for LD instructions that are missing the # sign. But why should that lead to problems that occur only 5% of the time during startup ? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted October 16, 2004 Share Posted October 16, 2004 Look through the source for LD instructions that are missing the # sign. But why should that lead to problems that occur only 5% of the time during startup ? I suppose that was meant as a general hint, as this is a very "popular" error. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 16, 2004 Share Posted October 16, 2004 Thanks for all the ideas. I've changed the bin: V2217 added 1 nop at the start of each bank for possible Atari hardware delays added more (redundant?) info to start vectors due to possible start up problems I wish I had an EPROM burner and the know-how to make a cart to test this on real hardware. Can anyone test this? My EPROM info source is gone for the weekend. If this binary doesn't work on a VCS cart, I'm seriously thinking about sponsoring a programming contest (this problem is driving me slightly crazy): If someone can solve the problem of why the program is not initializing properly on an 8k EPROM, I would gratefully send them a cart and manual as a prize. I would post the source, too (which would reveal the secrets of the game. I wanted to wait a while before posting it). 8kha2217.zip Quote Link to comment Share on other sites More sharing options...
Kroko Posted October 16, 2004 Share Posted October 16, 2004 Hmmm.... 50 normal starts in a row with the latest version. Quote Link to comment Share on other sites More sharing options...
Dav Posted October 19, 2004 Share Posted October 19, 2004 I tried the original version on my multicart. I ran it 10-15 times from each bank didn't see any problems. I'm having trouble understanding how removing the cart from the console could cause a problem related to the programing. Your program doesn't know if you turned it off and unplugged the cart or not. You couldn't check that if you wanted to. Dave Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 19, 2004 Share Posted October 19, 2004 I have a feeling that the code at the end of the banks is the culprit: ORG $1FF8 RORG $DFF8 .word 0,0,Bank1Start,0 ORG $2FF8 RORG $FFF8 .word 0,0,Start2,0 should be changed to: ORG $1FF6 RORG $DFF6 .word $FFFF .word $FFFF,Bank1Start,Bank1Start,Bank1Start ORG $2FF6 RORG $FFF6 .word $FFFF .word $FFFF,Start2,Start2,Start2 Plus I added an extra NOP at the start of each bank. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 19, 2004 Share Posted October 19, 2004 I tried the original version on my multicart. I ran it 10-15 times from each bank didn't see any problems. I'm having trouble understanding how removing the cart from the console could cause a problem related to the programing. Your program doesn't know if you turned it off and unplugged the cart or not. You couldn't check that if you wanted to. Dave Apparently 8k carts can start up in either bank, so the old code was causing problems when starting in the bank with the faulty coding for Atari hardware only; it doesn't show up in emulators (plus, hardware problems don't help either ). Quote Link to comment Share on other sites More sharing options...
Dav Posted October 19, 2004 Share Posted October 19, 2004 The one I tried was the first one listed 8kha2-v08.zip. On my multicart I can tell it which bank to start in. I made one entry to start in bank0 and one to start in bank 1. I didn't see anything wrong with either one. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 19, 2004 Share Posted October 19, 2004 I'm not sure what is causing the problems since I'm not the one doing the actual testing of the carts and hardware. Since it seems to work starting in both banks with the older version, it is probably a hardware problem or an incompatibility in the hardware with the coding. Is the multicart or krokodile cart loading the bin on a six switcher properly? I'm strongly suspecting that the new multicarts work better (= more compatible with the bin code) than the EPROMs, but I'm just speculating because I don't understand the specs and electronics of the systems. Quote Link to comment Share on other sites More sharing options...
Dav Posted October 20, 2004 Share Posted October 20, 2004 I was using a 6-switcher. Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 21, 2004 Share Posted October 21, 2004 This is out of the realm of bankswitching, but would omitting the SEI and CLD instruction at the reset cause start up errors in a six switcher and not in a four switcher? Quote Link to comment Share on other sites More sharing options...
atwwong Posted October 21, 2004 Share Posted October 21, 2004 This is out of the realm of bankswitching, but would omitting the SEI and CLD instruction at the reset cause start up errors in a six switcher and not in a four switcher? Yes it does! (answers own newbie question ) Problem solved. Atari hardware seems more finicky with regular cart EPROMS when bankswitching , and six switcher hardware is VERY finicky with code. Thanks everyone for helping me out! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.