Nukey Shay Posted February 20, 2009 Share Posted February 20, 2009 Usage: LDA #AND_VALUE SAX $ram Replacement for: TXA AND #AND_VALUE STA $ram Is this unstable with some versions of the 2600? Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted February 20, 2009 Share Posted February 20, 2009 (edited) AFAIK the SAX opcode is stable. I have a list of illegal opcodes, which is one that you actually posted Nukey. I crossed all the ones off that TJ said were unstable in a thread about FB2 compatibility. I can't remember if Batari said SAX was giving him problems or not on the FB2, but I do remember some of the illegal opcodes weren't accounted for when they made the chip. I also once remember a post by Dennis Debro (on the Stella Mailing list, I think) where he talks of Airlock using SAX (by accident). This is where: STA SWBCNT ; 4 LF021: LDA #$02 ; 2 .... LFB89: STA WSYNC ; 3 DEX ; 2 BNE LFB89 ; 2 JMP LF01F ; 3 jumps between the operator and operand Now SWBCNT = $0283, so that will preform SAX ($02,X). I'm guessing the strobe will preform a WSYNC, but never tested the theory. It'd be easy to test by fixing the jump to go to $F021 instead, and see if you drop a scanline. I've never heard of anyone having trouble with Airlock though, so I presume SAX is stable. Edit: I had the wrong addressing mode of SAX. It is SAX ($02,X) in this case, not SAX $02 as I originally posted. Thanks Batari. Edited February 21, 2009 by Omegamatrix Quote Link to comment Share on other sites More sharing options...
supercat Posted February 20, 2009 Share Posted February 20, 2009 Is this unstable with some versions of the 2600? I wouldn't expect so. During one half of each 6502 cycle, the internal data buses are unconditionally set to all "1"s; during the other half, any register which is supposed to output its contents will set to "0" any bus wire which should be "0". This requires considerably less circuitry than allowing each register to output both "1"'s and "0"'s. It also means that in case two registers try to put data on a bus simultaneously, any bit which is "0" in either registers will be "0" on the bus. Some opcodes have some odd behaviors I don't understand, but SAX is very straightforward. Quote Link to comment Share on other sites More sharing options...
Hornpipe2 Posted February 20, 2009 Share Posted February 20, 2009 I've never heard of anyone having trouble with Airlock though, so I presume SAX is stable. Well this probably explains why the screen rolls with Airlock on the FB2: http://kennedy.greg.googlepages.com/fb2compat.html Interestingly it sounds like someone could bang out an FB2-compatible Airlock. I may try it here in a bit. Quote Link to comment Share on other sites More sharing options...
Hornpipe2 Posted February 20, 2009 Share Posted February 20, 2009 (edited) I made the change as suggested. From what I can tell, one scanline is dropped from the title screen. (Actually this game is weird because it doesn't keep a constant number of scanlines anyway - at boot it is normally 257, then it switches to 256 after about a second or two, and during gameplay it is 260. With the hack it becomes 256/255 -> 260.) I wonder if this game rolls on real hardware as a result of the lack of consistency, and if that is what the reported FB2 problem is (as opposed to an unsupported illegal opcode). I always want for testers : ) Airlock__1982___No_SAX_Hack_.bin Edited February 20, 2009 by Hornpipe2 Quote Link to comment Share on other sites More sharing options...
+batari Posted February 20, 2009 Share Posted February 20, 2009 (edited) SBX gave me trouble on the FB2, but SAX did not. I wrote a game with several illegal opcodes, including SAX, and I recall only needing to remove SBX to get it to work. Still, FB2 compatibility should not be a consideration for a homebrew, IMO. EDIT: Airlock performs SAX ($02,X), not SAX $02. Edited February 20, 2009 by batari Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted February 21, 2009 Share Posted February 21, 2009 I'd try it for you Hornpipe2, but I don't have a modded FB2. I'm not sure the FB2 is compatible with the Krok either. I imagine that fix will work though. Looking at your list there are a whole pile of Superchip games, games that use unusual bankswicthing (like FE), and some homebrews that I presume are using some tricks or illegal ops. I wonder why some of the F8 games don't work though? I've read Galaxian preforms some tricks to get more sprites on the screen, but WaterWorld? Of course I've never really played WW except to plug in the cartridge and see if powers up, ha ha. 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.