Blue Azure Posted April 2, 2013 Share Posted April 2, 2013 That's right fans, only on the 7800. Have you ever noticed that all of the 6502 branch instructions end in a zero (0)? There were extras that BRK, CPX, CPY, JSR, LDY, RTI, and RTS used up. But one was missing. Until now. Finally exposed on atariage.com!!! OPCODE $00 BRK Break - Force Interrupt, 1 byte, 7 cycles OPCODE $10 BPL Branch if Positive, 2 bytes, 2 cycles OPCODE $20 JSR Jump to Subroutine, 3 bytes, 6 cycles OPCODE $30 BMI Branch if Minus, 2 bytes, 2 cycles OPCODE $40 RTI Return from Interrupt, 1 byte, 6 cycles OPCODE $50 BVC Branch if Overflow Clear, 2 bytes, 2 cycles OPCODE $60 RTS Return from Subroutine, 1 byte, 6 cycles OPCODE $70 BVS Branch if Overflow Set, 2 bytes, 2 cycles OPCODE $90 BCC Branch if Carry Clear, 2 bytes, 2 cycles OPCODE $A0 LDY Load Y Register immediate, 2 bytes, 2 cycles OPCODE $B0 BCS Branch if Carry Set, 2 bytes, 2 cycles OPCODE $C0 CPY Compare Y Register immediate, 2 bytes, 2 cycles OPCODE $D0 BNE Branch if Not Equal, 2 bytes, 2 cycles OPCODE $E0 CPX Compare X Register immediate, 2 bytes, 2 cycles OPCODE $F0 BEQ Branch if Equal, 2 bytes, 2 cycles HERE'S THE ONE THAT'S MISSING… OPCODE $80 BBQ Branch if Ready to Party, 2 bytes, infinite cycles (!) This instruction runs until you stop it! So what do you do with this new found instruction? Anyone who has programmed a game on the 7800 knows there's always a possible brick wall to your coding right around any corner. The former choices: (1) sleep on it and try again another day, (2) punt and cancel the game, or (3) call TEP392 and have Perry deal with it, as the 7800 insiders call it TEP-perware support, ya know Tepperware - every household should have Tepperware. Or now, we can use OP CODE 80. How does OP CODE 80 work? If you have code, any code that you can't get to work, simply add OP CODE 80 and it will automatically solve the problem. You can have OP CODE 80 operate in a range, by entering $80$10 and it will diagnose and correct the 16 bytes following the BBQ (80) instruction. Or the master trick is to enter $80$00 and it will diagnose problems forever, or until you halt the process. This cutting edge technology is using the new 78XX Divide-By-Zero (DBZ) technology. Here's an example of some code with OP CODE 80 implemented: MOVEDOIT: D516---B5-A2-----LDA BALLXPOS,X ;FIRST CHECK IF THE BALL IS OUTSIDE THE BOUNDARIES OF THE SCREEN D518---C9-18-----CMP #LEFTSIDE D51A---90-FA-----BCC MOVEDOIT D51C---C9-88-----CMP #RGHTSIDE ;RIGHT SIDE MINUS WIDTH OF SPRITE D51E---B0-13-----BCS MOVEFORCEL D520---B5-A6-----LDA BALLYPOS,X D522---C9-C8-----CMP #BOTSIDE D524---B0-14-----BCS MOVEFORCEV D526---80-00-----BBQ EVERYTHING ;SOLVE ALL MY 7800 CODING PROBLEMS D528---C9-04-----CMP #TOPSIDE + 4 D52A---90-10-----BCC MOVEFORCEV D52C---B0-56-----BCS MOVEBALLOK When this code was executed, it found that "90 FA" was wrong, and it should have been "90 10." Problem solved. Programming the 7800 has never been so easy!!! How do you read these branch instructions anyways? Example "90 FA". When the number is less than zero, eg-FA you count backwards to find where the branch is jumping to. The first byte counted is FA which is count FF, the next byte backwards is 90=FE, and the next byte is 18=FD, and the next byte is C9=FC, and the next byte is A2=FB, and the final byte is B5=FA. This is where 90 FA will branch to in this code. For a positive count branch like B0 13, you count 19 (13 hex = 19 decimal) bytes beyond the B0 13. Hence you start counting at B5=01, A6=02, C9=03, etc. Are you RDY2PARTY? Use BBQ OP CODE 80 today. Could be Hollywood's next smash hit. OP CODE 80 4 Quote Link to comment Share on other sites More sharing options...
AtariBrian Posted April 2, 2013 Share Posted April 2, 2013 What kind of april fools joke is this one Quote Link to comment Share on other sites More sharing options...
Blue Azure Posted April 2, 2013 Author Share Posted April 2, 2013 Shhhhh. You can April Fools most people some of the time. For those who still believe in OP CODE 80, this was a lot of work to hack the processor to squeeze out yet another instruction. Welcome to 2nd quarter 2013. Still going strong on the 7800 developments. I have a new game coming soon. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted April 3, 2013 Share Posted April 3, 2013 LMAO - BBQ. I love it. Quote Link to comment Share on other sites More sharing options...
tep392 Posted April 3, 2013 Share Posted April 3, 2013 I found your bug blue. D51A---90-FA-----BCC MOVEDOIT should be BCC MOVEFORCER Your welcome and consider this help free of charge. I'll require paypal for the next one. Now back to chasing bugs in DKXM. Quote Link to comment Share on other sites More sharing options...
Blue Azure Posted April 4, 2013 Author Share Posted April 4, 2013 OK Stephen, BBQ not to be confused with BEQ. Glad I'm not the only one laughing here. TEPmaster - Just checking you were still here and didn't fall asleep on Donkey for the XM. Thanks for the help, but my code is now blue bug free with the help of OP CODE 80. Quote Link to comment Share on other sites More sharing options...
WhyLee commotari.club Posted September 9, 2021 Share Posted September 9, 2021 in the 65C02 (the newer 6502 version from western design center) the opcode 80 is BRA which is branch always. i guess this command is only useful as a placeholder and in self modifying code. sadly they did not call the opcode BBQ (branch but quiet/quicker). in the old 6502 it was an illegal opcode with the function of NOP, right? have someone tried the 65C02 as a kind of upgrade in the atari 7800 or 2600? Quote Link to comment Share on other sites More sharing options...
ZylonBane Posted September 9, 2021 Share Posted September 9, 2021 This thread is over eight years old. How did you even find it? And you know it's a joke thread, right? Quote Link to comment Share on other sites More sharing options...
JumbleJag Posted September 9, 2021 Share Posted September 9, 2021 (edited) 10 hours ago, WhyLee commotari.club said: in the 65C02 (the newer 6502 version from western design center) the opcode 80 is BRA which is branch always. i guess this command is only useful as a placeholder and in self modifying code. sadly they did not call the opcode BBQ (branch but quiet/quicker). in the old 6502 it was an illegal opcode with the function of NOP, right? have someone tried the 65C02 as a kind of upgrade in the atari 7800 or 2600? Op posted on April 1st,it's a joke WhyLee Edited September 9, 2021 by JumbleJag Quote Link to comment Share on other sites More sharing options...
GrenMag Posted September 10, 2021 Share Posted September 10, 2021 15 hours ago, WhyLee commotari.club said: in the 65C02 (the newer 6502 version from western design center) the opcode 80 is BRA which is branch always. I always saw it documented with the mnemonic BRAH, also known as the "dude branch". 1 Quote Link to comment Share on other sites More sharing options...
+batari Posted September 10, 2021 Share Posted September 10, 2021 You're all wrong. Opcode $80 is BUM because it doesn't do anything useful; it only wastes time, takes up space and uses resources while contributing nothing. 1 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.