+SpiceWare Posted June 16, 2016 Share Posted June 16, 2016 OK.. I see that .byte is not the command... Now it seems like it is a way to trick DASM, not the 6502. I'd think that DASM could just allow the command but I'm sure there is a reason it doesn't. It would lead to hard to find bugs if you accidentally put in an instruction without the operand and the compiler didn't complain. A warning would work, but over time you'd learn to ignore those warnings. By doing it via .byte you're basically saying "yes, I know what I'm doing isn't normal, but I'm doing it anyway". So indirect addressing means the operand is the location where the location of the data is stored? I hope that's right because I've been having a hard time with that stuff. I have immediate addressing down pretty good though!Correct, it's the location of the location. I am still thrown off by the sbc #0. This looks like "subtract zero" to me, and not "make it zero". That's exactly what it is, subtract zero. Remember learning subtraction back in grade school? You had to manually keep track of the "1" you needed to borrow when doing the ones column subtraction so that when you did the tens column the 2-0 became 2-1-0. The 6507 is doing the same thing, but at a byte level instead of a ones or hundreds position. If the SBC needed to do a borrow it denotes it via the carry flag. The status of the carry flag tells the next SBC if it needs to do an extra "-1" to make up for a borrow. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted June 16, 2016 Share Posted June 16, 2016 At the end of the day, you're producing a stream of binary numbers that the 6502 executes, how you get them assembled into memory, is your business. -Thom Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 17, 2016 Share Posted June 17, 2016 OK, I do see now that you said that you hard coded zero as the MSB for object Y , not Player0Ptr+1. That threw me off a bit. Sorry about this. I know I'm not asking clearly enough, or I'm missing the answer. But could I ask the remaining part of the question using your example, if you still have the patience? Thanks for the help with this- I really appreciate it. Instead of: 20 - 03 ------- 17 We are doing (in the code- SBC #0) for the MSB: 20 - 0 ------ 20 As far as I can tell, this always keeps the MSB of Player0Ptr+1 the same. Also, I don't think it would affect the carry flag; that subtracting 0 would never affect the carry flag. More concisely- I looks to me like SBC #0 is doing nothing and could be removed from the program and have no effect. What is it doing? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted June 17, 2016 Share Posted June 17, 2016 To translate my example of 20-3 to 16 bit math you need to consider the 0 (from the 20) and the 3 as the LSB values and the 2 and the 0 (implied with the 3) as the MSB values. The LSB subtraction of 0-3 is done first and triggers a carry, which causes the MSB subtraction of 2-0 to do an extra -1 as part of its calculation. 1 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 18, 2016 Share Posted June 18, 2016 Ughh.. Of course.. I was still stuck on that "hard coded to zero" thing I think. Thanks! Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 29, 2016 Share Posted June 29, 2016 Hi! I'm looking for the instructions for DASM. I'm pretty sure its called dasm.txt. I'm pretty sure I used to have it. I'm pretty sure it came in the zip file for DASM. Yet I can't seem to locate it in or find it online. Can anyone please point me to it? Quote Link to comment Share on other sites More sharing options...
tschak909 Posted June 29, 2016 Share Posted June 29, 2016 Go grab a copy of dasm, it's small enough... http://dasm.sourceforge.net/ -Thom Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 30, 2016 Share Posted June 30, 2016 Thanks- I got a copy and am reading now.. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted June 30, 2016 Share Posted June 30, 2016 you use ds in byte, word, or double word increments (1, 2, 4 bytes a piece), if you need a set of variables, define them: SEG.U VARS ORG $80 Frame: ds 1 ; Frame counter. ScanLine: ds 1 ; scanline counter PlayerY0: ds 1 ; Player Y0 PlayerY1: ds 1 ; Player Y1 BallY0: ds 1 ; ball y0 BallY1: ds 1 ; missile y0 BallY2: ds 1 ; missile y1 Score: ds 1 ; Score Timer: ds 1 ; Timer DigitOnes: ds 2 ; Player 0 and 1 digit graphics DigitTens: ds 2 ; Player 0 and 1 digit graphics ScoreGfx: ds 1 ; pointers TimerGfx: ds 1 ; pointers Temp: ds 1 ; Temp TempStackPtr: ds 1 ; Temporary Stack Pointer GameState: ds 1 ; store game state (BIT tested) Temp2: ds 1 ; another temp value ColorCycle: ds 1 ; Color cycling temp value (attract mode) JoystickStates: ds 1 ; Joystick states. P0XVelocity: ds 1 ; P0 X Velocity P1XVelocity: ds 1 ; P0 Y Velocity P0YVelocity: ds 1 ; P1 X Velocity P1YVelocity: ds 1 ; P1 Y Velocity P0XIsWaiting: ds 1 ; P0 X is Waiting (BIT 7) P1XIsWaiting: ds 1 ; P1 X is Waiting (Bit 7) P0YIsWaiting: ds 1 ; P0 Y is Waiting (BIT 7) P1YIsWaiting: ds 1 ; P1 Y is Waiting (BIT 7) VelocityTemp: ds 1 ; used for velocity unpacking. VelocityFlip: ds 1 ; used to flip velocity values. WaitingTemp: ds 1 ; Waiting index temp between frames. 1 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted July 1, 2016 Share Posted July 1, 2016 Thanks.. I get it now.. Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted July 10, 2016 Share Posted July 10, 2016 (edited) Hello.. I stuck this routine in my kernal to draw the ball. Is it efficient enough (20 cycles) or should I do something else? Same question for missiles: Ball: lda #BALL_HEIGHT-1 ; 2 2 dcp BallDraw ; 5 7 bcs DoDrawBall ; 2 9 lda #0 ; 2 11 .byte $2C ; 4 15 DoDrawBall: ; lda #2 ; 2 17 sta ENABL ; 3 20 Thanks! Edited July 11, 2016 by BNE Jeff Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted July 11, 2016 Share Posted July 11, 2016 Wait.. That's not 20 cycles- more like 15 with the branch. Still- is this a waste of cycles or is it ok? Quote Link to comment Share on other sites More sharing options...
Rhindle the Dragon Posted December 25, 2016 Share Posted December 25, 2016 The link to DASM on this site is broken. Someone might want to fix that... Can someone point me toward a download of vcs.h and the other include files? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted December 26, 2016 Share Posted December 26, 2016 I link to the current version in my tutorial, Collect. You can find DASM here. For some reason the include files are not included with the binaries, instead you'll have to source for DASM to get the include files. Quote Link to comment Share on other sites More sharing options...
Alejandro10000 Posted April 11, 2017 Share Posted April 11, 2017 Hello, Im new here Quote Link to comment Share on other sites More sharing options...
SignGuy81 Posted May 9, 2017 Share Posted May 9, 2017 (edited) I'm tempted to start an interactive course/dialog to help newcomers to '2600 programming get up and running. Just wondering how many people would follow such a happening. * If you would be interested in participating, post a reply to this * What particular areas of progamming would you like to see covered * what level of knowledge should be assumed * any comments? My tentative title for the course would be "000001010 00101000 00000000 01100101" - 10 points to the first person who can tell me what on earth this means Cheers A This is very old post but thought I'd take my stab at it. I came up with 6502 8A. I guess 8A for 8-bit architecture? The 101 kept throwing me off at the end I kept thinking it was going to be like every other course with 101 on the end of it so figured there must be significance in it but couldn't get anything else in front that made sense. I converted each set to decimal for 10 40 0 101, once I had the last set at 101 I figured I needed to convert the first 3 sets which I tried everything, and couldn't come up with nothing, so I then converted all to hex for A 28 0 65 and figured if I read from right to left to get 65028A which I'm assuming is for the 6502 processor and 8A being that it is 8 bit architecture. Am I even close? EDIT: I guess the A could also stand for "assembly"? Edited May 9, 2017 by SignGuy81 Quote Link to comment Share on other sites More sharing options...
SignGuy81 Posted June 12, 2017 Share Posted June 12, 2017 (edited) This is very old post but thought I'd take my stab at it. I came up with 6502 8A. I guess 8A for 8-bit architecture? The 101 kept throwing me off at the end I kept thinking it was going to be like every other course with 101 on the end of it so figured there must be significance in it but couldn't get anything else in front that made sense. I converted each set to decimal for 10 40 0 101, once I had the last set at 101 I figured I needed to convert the first 3 sets which I tried everything, and couldn't come up with nothing, so I then converted all to hex for A 28 0 65 and figured if I read from right to left to get 65028A which I'm assuming is for the 6502 processor and 8A being that it is 8 bit architecture. Am I even close? EDIT: I guess the A could also stand for "assembly"? I went back through and seen someone else put "2600 101" and was trying to figure out how to come to that conclusion. I didn't realize that 0000000 would stand for a space when I was originally trying to figure it out. So now I see where 2600 comes from by converting the 00001010 00101000 to binary you have 2600. At first I tried each set separate and all three together except the last which I new was 101 and for the life of me couldn't figure out where the 2600 came from, until earlier converting just the first two sets together, not understanding before that the 00000000 was supposed to be a space. Now that that is said and done though I think that was neat that I was able to come up with what I came up with above in the post I just quoted as well. Worked out kinda cool imo Edited June 12, 2017 by SignGuy81 Quote Link to comment Share on other sites More sharing options...
flo3ds Posted October 27, 2017 Share Posted October 27, 2017 Is it now possible to program in another language? Quote Link to comment Share on other sites More sharing options...
alex_79 Posted October 27, 2017 Share Posted October 27, 2017 http://atariage.com/forums/forum/65-batari-basic/ Quote Link to comment Share on other sites More sharing options...
ILA2600 Posted December 26, 2017 Share Posted December 26, 2017 I'm in, I can hack the games all I want, but I'd like to know how to make them from scratch, It would give me a better feel of the games and also give me a sense of accomplishment knowing I made a Atari game on my own! :-) Quote Link to comment Share on other sites More sharing options...
Pixel Toad Posted April 2, 2018 Share Posted April 2, 2018 (edited) I'm tempted to start an interactive course/dialog to help newcomers to '2600 programming get up and running. Just wondering how many people would follow such a happening. * If you would be interested in participating, post a reply to this * What particular areas of progamming would you like to see covered * what level of knowledge should be assumed * any comments? My tentative title for the course would be "000001010 00101000 00000000 01100101" - 10 points to the first person who can tell me what on earth this means Cheers A I'm tempted to start an interactive course/dialog to help newcomers to '2600 programming get up and running. Just wondering how many people would follow such a happening. * If you would be interested in participating, post a reply to this * What particular areas of progamming would you like to see covered * what level of knowledge should be assumed * any comments? My tentative title for the course would be "000001010 00101000 00000000 01100101" - 10 points to the first person who can tell me what on earth this means Cheers A I'm tempted to start an interactive course/dialog to help newcomers to '2600 programming get up and running. Just wondering how many people would follow such a happening. * If you would be interested in participating, post a reply to this * What particular areas of progamming would you like to see covered * what level of knowledge should be assumed * any comments? My tentative title for the course would be "000001010 00101000 00000000 01100101" - 10 points to the first person who can tell me what on earth this means Cheers A Yeah I am interested. Edited April 2, 2018 by Pixel Toad Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted April 6, 2018 Share Posted April 6, 2018 (edited) Yeah I am interested. great !! You can start Here!! http://atariage.com/forums/topic/33233-sorted-table-of-contents/ cheers! Edited April 6, 2018 by zilog_z80a Quote Link to comment Share on other sites More sharing options...
Samuel Pedigo Posted July 7, 2019 Share Posted July 7, 2019 On 5/24/2003 at 4:36 PM, NE146 said: It means the name of your course in decimal is 170,393,701? why does your picture look like a naked jackhammer. not offended, just curious. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 7, 2019 Share Posted July 7, 2019 On 7/9/2016 at 8:29 PM, BNE Jeff said: I stuck this routine in my kernal to draw the ball... That routine is not cycle-exact...taking 15 cycles when drawing, but 18 when not. Try this: Ball: lda #BALL_HEIGHT-1 ; 2 2 dcp BallDraw ; 5 7 lda #1 ; 2 9 bcs DoDraw Ball ; 2 11 .byte $24 ; 3 14 BIT.$zp DoDrawBall: ;@12 asl ; 2 14 A=2 sta ENABL ; 3 17 17 cycles for both cases. 1 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted July 7, 2019 Share Posted July 7, 2019 Nevermind...just noticed that this was necrobumped 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.