David Arlington
David Arlington
  • 65
  • 27 142
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 10
The 13th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge.
This video covers:
Two more ways to deal with MAC/65 co-resident in memory overwriting your code, including how to use .INCLUDE files. More available zero page locations! A new general purpose subroutine to move/copy any size memory from one place to another in memory. Works on any 6502 machine. How to use DDT not just as a debugging tool, but also as a testing tool. Finally, what good a good test plan should be, a discussion of code coverage.
Code for my videos are at my GitHub at GitHub.com/DavidArlington/MAC-65. Expect a couple days lag for each videos code to be uploaded since they will be more heavily commented.
Atari Books referenced in this video and where you can download them:
MAC/65 and DDT Manual:
www.atarimania.com/documents/MAC-65-Reference-Manual.pdf
Mapping the Atari by Ian Chadwick:
www.atarimania.com/documents/Mapping-the-Atari.pdf
Compute's Machine Language for Beginners by Richard Mansfield:
www.atarimania.com/documents/Machine-Language-for-Beginners.pdf
Compute's Second Book of Machine Language by Richard Mansfield:
www.atarimania.com/documents/The-Second-Book-of-Machine-Language.pdf
Atari Roots by Mark Andrews:
www.atarimania.com/documents/Atari-Roots-A-Guide-to-Atari-Assembly-Language.pdf
SAMS Programmer's Reference Guide for the Atari 400/800 Computers:
www.atarimania.com/documents/Programmers-s-Reference-Guide-for-the-Atari-400-800-Computers.pdf
Your Atari Computer by Poole, McNiff, and Cook:
www.atarimania.com/documents/Your-Atari-Computer-XL-Edition.pdf
Tom Hudson's Machine Language Boot Camp Series Analog Magazine (starting in Issue 13):
archive.org/details/analog-computing-magazine-13/page/n67/mode/2up
มุมมอง: 370

วีดีโอ

MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 9.2
มุมมอง 20514 วันที่ผ่านมา
The 12th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: I complete the last major portion of coding logic for checking a joystick and moving a character around on the screen in assembly language. I introduce four new instructions and demonstrate how to code nested IF-THEN statements in Assem...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 9.1
มุมมอง 29714 วันที่ผ่านมา
The 11th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: Lots of coding towards completing Phase 1 of the Game Demo in 100% Assembly Language. I finish defining our vars and constants, and complete the Main logic loop, Setup and Initialization, a routine to erase the character in one place an...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 8
มุมมอง 30321 วันที่ผ่านมา
The 10th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: A discussion of my implementation of a Standard Coding Practices for Atari 6502 Assembly with MAC/65 and why I feel it's important. An example of what I consider a not good programming practice. We also start building a diagram and layi...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 7.2
มุมมอง 37421 วันที่ผ่านมา
The 9th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: This shorter video wraps up the BASIC/Action! statement translations for the COLOR and PLOT commands that are needed to get started on the assembly language game demo coming up next. Code for my videos are at my GitHub at GitHub.com/Davi...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 7 (redux)
มุมมอง 26128 วันที่ผ่านมา
The 8th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: Finish up discussing the joystick demo program including last logical operators BIT, EOR and ORA. An introduction to doing Atari BASIC Graphics and SetColor commands in Assembly Language using the Atari IOCB (Input Output Control Blocks)...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 6
มุมมอง 393หลายเดือนก่อน
The 7th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: A discussion on the use of Logical AND command to test specific bits in a byte. A few ways to do variables in assembly language including using a new compiler directive. Code for my videos are at my GitHub at GitHub.com/DavidArlington/MA...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 5
มุมมอง 497หลายเดือนก่อน
The 6th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: A discussion on how to make sure your code can assemble no matter what address you start it at. The difference between ROR (Rotate Right) and LSR (Logical Shift Right) - which also includes the difference between ROL (Rotate Left) and AS...
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - The Final Week!
มุมมอง 45หลายเดือนก่อน
The last week of play and the final score for a solo playthrough of the classic Avalon Hill boardgame, Magic Realm. Amazon vs. Octopus! Who will win?
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Remainder Week 3
มุมมอง 320หลายเดือนก่อน
Last five days of Week 3 of a solo playthrough of the classic Avalon Hill boardgame, Magic Realm. If you liked the Amazon - Woodfolk throwdown in the last video, here there be Dragons! Flying Dragons! And an Octopus. Business picks up the back half of Week 3. This is NOT intended to be a tutorial video (though I will be doing some explanations as I go). To learn how to play Magic Realm, I canno...
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 4
มุมมอง 1.6Kหลายเดือนก่อน
The 5th in a series of videos in programming in Assembly Language for the Atari 8-bit computers using the MAC/65 Assembler Editor cartridge. This video covers: Lots of hands on programming this time. We look at how to make your Assembly Programs be runnable from DOS. We are expanding the joystick program to read the joystick and the joystick trigger. We'll look at two different ways to do that ...
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Days 15-16
มุมมอง 142หลายเดือนก่อน
First two days of Week 3 of a solo playthrough of the classic Avalon Hill boardgame, Magic Realm. If you were surprised there was only one combat in the first two weeks of the game, get ready for a full out brawls in this one! Things take a turn! There is an error at 16:20 which I correct after the jump edit at 23:30. This is NOT intended to be a tutorial video (though I will be doing some expl...
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules -Week 1/2 Corrections/Omissions
มุมมอง 54หลายเดือนก่อน
This is a short video just covering some of the corrections and omissions for the first two weeks of the playthrough.
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Week 2
มุมมอง 194หลายเดือนก่อน
Week 2 of a solo playthrough of the classic Avalon Hill boardgame, Magic Realm, which came out in 1979 and is still enjoyed by many to this day. This playthrough uses an actual physical copy of the game, the basic 2nd Edition Rules (no Advanced or Optional rules, no fan created material) using the official 2nd Edition rules for Solo play. This is NOT intended to be a tutorial video (though I wi...
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Week 1
มุมมอง 148หลายเดือนก่อน
This is a solo playthrough of the classic Avalon Hill boardgame, Magic Realm, which came out in 1979 and is still enjoyed by many to this day. This playthrough uses an actual physical copy of the game, the basic 2nd Edition Rules (no Advanced or Optional rules, no fan created material) using the official 2nd Edition rules for Solo play. This is NOT intended to be a tutorial video (though I will...
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Intro and Setup
มุมมอง 401หลายเดือนก่อน
Magic Realm - Solo Amazon Playthrough - 2nd Edition Base rules - Intro and Setup
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 3.2
มุมมอง 592หลายเดือนก่อน
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 3.2
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 3.1
มุมมอง 371หลายเดือนก่อน
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 3.1
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 2
มุมมอง 8742 หลายเดือนก่อน
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 2
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 1
มุมมอง 1.9K2 หลายเดือนก่อน
MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 1
Action! Programming for the Atari 8-bit Computer - Part 25 - Analyzing/Reviewing a Program
มุมมอง 1.4K2 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 25 - Analyzing/Reviewing a Program
Action! Programming for the Atari 8-bit Computer - Part 24 - Action Run-Time Toolkit
มุมมอง 3842 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 24 - Action Run-Time Toolkit
Action! Programming for the Atari 8-bit Computer - Part 23 - Player Missile Graphics 2
มุมมอง 3352 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 23 - Player Missile Graphics 2
Action! Programming for the Atari 8-bit Computer - Part 22 - Player Missile Graphics 1
มุมมอง 4242 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 22 - Player Missile Graphics 1
Action! Programming for the Atari 8-bit Computer - Part 21 - Antic Mode 4 Part 3
มุมมอง 2982 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 21 - Antic Mode 4 Part 3
Action! Programming for the Atari 8-bit Computer - Part 20 - Antic Mode 4 Part 2
มุมมอง 1612 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 20 - Antic Mode 4 Part 2
Action! Programming for the Atari 8-bit Computer - Part 19 - Introduction to Antic Mode 4
มุมมอง 7112 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 19 - Introduction to Antic Mode 4
Action! Programming for the Atari 8-bit Computer - Part 18 - Introduction to Pointers
มุมมอง 2012 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 18 - Introduction to Pointers
Action! Programming for the Atari 8-bit Computer - Part 17 - Details of Graphics 1/2
มุมมอง 1592 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 17 - Details of Graphics 1/2
Action! Programming for the Atari 8-bit Computer - Part 16 - Plotting Text in Graphics 8, Strings
มุมมอง 5372 ปีที่แล้ว
Action! Programming for the Atari 8-bit Computer - Part 16 - Plotting Text in Graphics 8, Strings

ความคิดเห็น

  • @user-nd8zh3ir7v
    @user-nd8zh3ir7v 4 วันที่ผ่านมา

    I really enjoy this content, keep up the good work! thx

  • @nickfolino8228
    @nickfolino8228 6 วันที่ผ่านมา

    Interesting way of doing it. I've never copied single bytes in these routines. It's usually a page or 1k blocks at a time. Instead of reserving space in zero page, then setting variables, then writing code to put those variables into the reserved locations, it would be much easier to just store your data when you reserve the space. 130 SRCADR .WORD $E200 140 DESTADR .WORD $5000 Then you can eliminate lines 180, 190 and 210-300 It's much more easier to read too. Also the MVRMDR can be sped up using a decrement. If you load size into the x or y register you can just decrement that, no need to use another register to count up and compare it to SIZE Just count down and you only need the BEQ. I provided sample code in an earlier video. Great series! I like watching you do this live. Don't worry. We all make the same typing mistakes! Some of us more than you 🙂

    • @davidarlington1206
      @davidarlington1206 5 วันที่ผ่านมา

      1) What native 6502 instruction lets you copy a whole page at a time? 2) For the purposes of the demo, I could have put the source and destination values directly into zero page, but then it's a zero page constant not a variable and I was thinking ahead to the next video when SRCADR and DSTADR are going to be used several times with different values. 2a) In a side note, I DID try to set SIZE as a constant in zero page, but MAC/65 did not like that for some reason and overwrote my constant even though the compiler said it compiled OK. I'm going to investigate that later. As mentioned in the video, the MAC/65 manual is unclear about its own usage of the top half of zero page locations. 3) My first version of this DID use a decrement method for MVRMDR, but I wasn't happy with my explanations being as clear as they were for the way I ended up doing it. As mentioned in reply to some other comments, I'm not always looking for the fastest or most efficient way to do something, but rather something I can clearly explain the concepts and reasoning and then hopefully inspire people to try their own ways. It was also easier to explain the DDT testing part doing it that way and giving examples of testing was another goal here. I did try to make a point that there are plenty of examples of this code you can find a lot of places (especially since this logic is not Atari-specific) of how to code this subroutine and that I was sure someone could find a better way out there with just a little effort. A goal of the series though is not to tell people how to write code by telling them a certain way, but how to explain things so they can write their own code. Someone commented with a working example of the decrement way for MVRMDR and that made me feel great because that's what I'm hoping for in the end. I get you started, you think up better ways or your own ways on your own!

  • @johnrazler8394
    @johnrazler8394 6 วันที่ผ่านมา

    Note: she couldn't use the Elven Slippers unless she dropped her M Armor.

    • @davidarlington1206
      @davidarlington1206 6 วันที่ผ่านมา

      Right. I thought I mentioned that was one of the reasons she didn't go for them but I probably was thinking of saying it but never did. Thanks for catching that. Once I saw those 7 League Boots that's all I had eyes for! LoL

  • @AlexEvans1
    @AlexEvans1 7 วันที่ผ่านมา

    How about: 420 bne mvpage 430 ; 440 ;

    • @davidarlington1206
      @davidarlington1206 7 วันที่ผ่านมา

      Yeah, watching it back I realized I didn't really need 430 and if I don't need that then your suggestion is the best way. Those are the things you clean up AFTER you make sure it's working and you have a bunch of tests to test it. Or when you're watching it back LOL

    • @STN-t5k
      @STN-t5k 6 วันที่ผ่านมา

      @@davidarlington1206 On a similar note, the loop for the reminder could be: iny cpy size bne move

    • @STN-t5k
      @STN-t5k 6 วันที่ผ่านมา

      The loop for the reminder would also be shorter and faster if the X register was used to count how many elements are left to copy, instead of using the Y register to compare if it’s equal to the contents of the size variable. Maybe something like this? ldx size beq mvdone ldy #0 move: lda (srcadr),y sta (dstadr),y iny dex bne move

    • @AlexEvans1
      @AlexEvans1 6 วันที่ผ่านมา

      @@STN-t5k going that route you can reverse the copying order for the sub page portion. However, I think it was thought to be a smidge less clear.

    • @davidarlington1206
      @davidarlington1206 6 วันที่ผ่านมา

      @@STN-t5k I toyed around with using a DEX method but as Alex suggests and I've mentioned in the past, sometimes the decisions on a particular way to do something is more tied to make the code clear and understandable rather than teaching efficiency. That's also why I made a point to say in the video that I hope people are taking my explanations about what the code is doing and why as inspiration to write and find their own ways to do things. (Which you did which is exactly what I'm hoping for with these videos!) I want to show a way I think I can make clear to all levels and then let folks take the car out for a spin on their own. Alex's suggestion was more efficient than what I had but it doesn't lose any clarity either.

  • @KaltOhm
    @KaltOhm 7 วันที่ผ่านมา

    This series is so fascinating! I really appreciate your efforts and the incredible value of preserving this knowledge about the early times of personal computing. Thanks and please keep this great work coming!

    • @davidarlington1206
      @davidarlington1206 7 วันที่ผ่านมา

      Thanks for the kind words. I've been having fun rediscovering the things that got me started as a developer in the first place, long ago!

    • @STN-t5k
      @STN-t5k 6 วันที่ผ่านมา

      @@davidarlington1206 Yeah, this series is great. I love how you take the time to go into the subject in detail, 80 minutes seems about the right length for it.

    • @davidarlington1206
      @davidarlington1206 6 วันที่ผ่านมา

      @@STN-t5k I can't seem to get away from that 80 minutes length despite my best plans LoL

  • @davidarlington1206
    @davidarlington1206 7 วันที่ผ่านมา

    Just some minor notes this time: 1) I broke one of my own rules at 38:30, should have kept that label to 6 chars like MOVMEM :) 2) At 47:00 or thereabouts, I'm not sure that LDY #$00 at line 430 is really necessary (since it should still be 0 from rolling over) but it doesn't hurt anything there. Overall, this may be the video I'm most happy with how it came out as far as content is concerned.

  • @og_dagr8hoodoo
    @og_dagr8hoodoo 9 วันที่ผ่านมา

    following along, and I am a noob with the atari. I notice you change the listing on the screen, for example the .byte to .sbyte then you seem to arrow to after edit, and hit some key and it makes the change, what is that magic key as just hitting return, give me the familiar What! Keep up the good work, this inspired me to resume what i tried back in '87

    • @og_dagr8hoodoo
      @og_dagr8hoodoo 9 วันที่ผ่านมา

      nevermind, I just realized you hit enter before going back down :)

    • @davidarlington1206
      @davidarlington1206 6 วันที่ผ่านมา

      @@og_dagr8hoodoo Ahhh! Sorry I missed this comment before this! Glad you figured it out. I know there's plenty of instances where I forget to hit Enter when I change a line. I'm glad I remembered on this one. A pretty big mistake happens in a later video because of me forgetting to hit Enter after changing something!

    • @og_dagr8hoodoo
      @og_dagr8hoodoo 6 วันที่ผ่านมา

      @@davidarlington1206 I hope some muscle memory will eventually develop for me ;) Having fun following along with you! Thanks!

  • @STN-t5k
    @STN-t5k 9 วันที่ผ่านมา

    The text on the new monitor looks pretty sharp. Looking forward to the next video!

  • @Thesecret101-te1lm
    @Thesecret101-te1lm 10 วันที่ผ่านมา

    Great vid as always! Congrats on hitting the exakt 1hr mark :) Just want to point out that if you happen to want to test all bits and use either ROR or ROL, a 9th ROR or ROL will make it a non-destructive test, and it will even restore carry to whatever it contained before doing the testing. Probably a rare case that this would be useful, like if you have already tested all four directions on two joysticks you probably have no use for the joystick value any more. You might have something meaningful in the carry flag though.

  • @maxmuster7003
    @maxmuster7003 11 วันที่ผ่านมา

    8 bit is better than 1 bit 😂 Imagine you have to use 8 instruction to build one byte.

  • @nickfolino8228
    @nickfolino8228 12 วันที่ผ่านมา

    I'm really enjoying this series. Glad to see I'm not the only one that makes mistakes like that! I usually sleep on them, and when I come back I spot the mistake almost instantly.

    • @davidarlington1206
      @davidarlington1206 12 วันที่ผ่านมา

      @@nickfolino8228 That happens a lot for me too! In the morning the brain is clear! In this case, I actually had already set up an intentional mistake to show DDT breakpoints and then didn't even have to use it because of the real mistake! LoL

  • @takingbytes1265
    @takingbytes1265 13 วันที่ผ่านมา

    I followed along with Ed, back when he was making his videos, doing it on real hardware with MAC/65.

  • @carl160269
    @carl160269 13 วันที่ผ่านมา

    Write out 100 times 'I must press enter after editing'

    • @davidarlington1206
      @davidarlington1206 13 วันที่ผ่านมา

      Right? Except even then I'd probably forget to hit Enter on 50 of them! 😊

  • @garymartin6987
    @garymartin6987 13 วันที่ผ่านมา

    I wrote primarily in Action! The only thing I missed though was that you couldn't write recursive routines in the same manner as Pascal or Basic.

  • @davidarlington1206
    @davidarlington1206 14 วันที่ผ่านมา

    OK the good news is I finish up the coding logic to move a character around on the screen with a joystick in assembly code. I also show four new instructions and how to do nested IF-THEN logic in assembly. The bad news (sort of) is that I make a typing mistake in the first 6 1/2 minutes that leads to a 30 minute DDT debugging session at the end. Not that is totally a bad thing because I show in this video more real life examples of debugging assembly code including how to set breakpoints inside of DDT and how to use them, including setting a single breakpoint and then setting multiple breakpoints. It's just super annoying because my mistake is something I look at right in front of my face 15 seconds after I make it and MULTIPLE times after that and never see it. And when I finally DO see it, I still can't seem to get it typed in right. Very embarrassing as well as annoying but welcome to real life. :)

  • @takingbytes1265
    @takingbytes1265 15 วันที่ผ่านมา

    I followed along with Ed, using my XL & MAC/65 back when he was doing that. I have the atr files on my GitHub page. Unfortunately, TH-cam is not letting me post the account name here in case you want to check it out.

  • @nickfolino8228
    @nickfolino8228 15 วันที่ผ่านมา

    Your code listing is also getting to the size where you should think about splitting up your source into multiple files and using include directives for the assembler to put it back together for you.

    • @davidarlington1206
      @davidarlington1206 15 วันที่ผ่านมา

      @@nickfolino8228 Yes, agreed there. That's coming up soon.

  • @nickfolino8228
    @nickfolino8228 15 วันที่ผ่านมา

    In PLOTCH, STX and STY can be used to store the X and Y registers. There's no need to transfer them into the accumulator first.

    • @davidarlington1206
      @davidarlington1206 15 วันที่ผ่านมา

      @@nickfolino8228 Great point! I'll change that tonight when I finish up.

  • @brianwild4640
    @brianwild4640 15 วันที่ผ่านมา

    or th-cam.com/video/36MFqY55yR0/w-d-xo.html by peter dell

    • @davidarlington1206
      @davidarlington1206 10 วันที่ผ่านมา

      I think I might have looked at that series before but too much PC and not enough real Atari for my tastes. I DO appreciate the folks though who have used new IDEs like this to provide us with so many new modern Atari games.

  • @davidarlington1206
    @davidarlington1206 15 วันที่ผ่านมา

    This is the comment where I cover my own mistakes so you don't have to! First though, if you want to see someone doing a tutorial on Atari Assembly programming using a cross compiler on a PC with Eclipse, check out this playlist from Misson Ed Possible TH-cam channel: th-cam.com/video/whhTuBpkcrY/w-d-xo.html&pp=iAQB My mistakes this video: 1) at 18:20, I type in MIXY when I want MINY. Doesn't cause a problem this video since we didn't get to checkmove routine. 2) at 22:30, I say location 19 "changes" every 18 minutes and location 18 "changes" every 36 hours when I actually mean to say "rolls over" (i.e. flips from 255 to 0) 3) at 44:50, HUGE MISTAKE that is the cause of my later debugging efforts in this video. Not only do I type LDA instead of LDX (bad!), I also never hit ENTER on this line so it never gets entered into memory. Therefore the PLOTCH routine tries to use Channel 0 (the Editor). OOPS! The good news is I get to explain how to debug a running assembly program using DDT. 4) at 62:00, I mean to start talking about how essentially all variables in assembly language are global variables and I mean to draw a comparison to Atari BASIC, but I lose my train of thought, not once, but twice! It will be first thing I talk about next video. 5) At the end, hang on for the last four minutes after the 'false finish' (if you make it that far). And when I sum up what was covered in the video, I mentioned global variables, but of course, as noted above, I forgot to do that.

  • @STN-t5k
    @STN-t5k 19 วันที่ผ่านมา

    Another great video, Dave! It's very informative to hear you explain your coding style in detail. It's also interesting to see how laborious it is to stitch the multiple pieces of the program together. Not being able to renumber sections of the code seems like a major omission in MAC/65.

    • @STN-t5k
      @STN-t5k 19 วันที่ผ่านมา

      Could renumbering have been improved in later versions of MAC/65? I'm not sure which version you are using, I think you mentioned early on that you have several of them.

    • @STN-t5k
      @STN-t5k 19 วันที่ผ่านมา

      Can you also elaborate a bit on why you don't use the Num command? I think this is also something you mentioned early on, but I don't think I got the explanation. To me, it feels rather tedious to enter a line number every time, so automatic line numbers feel like a nice feature to have.

    • @davidarlington1206
      @davidarlington1206 19 วันที่ผ่านมา

      I'm going to answer all three comments in one reply if that's OK. I do have three different versions of MAC/65, 1.01, 1.02 and 3.6. I can't really tell a difference between any of them so far to be honest. Certainly the renumbering utility getting improved wasn't one of the enhancements. It's the same in all three versions. I don't know if I'd call it a major omission since at least there's SOMETHING there, but I would have no problem saying it seems like it was an afterthought. I'm thinking maybe because of packing DDT and all the other features like supporting Macros, the utility package was probably very low on their list of feature importance? It's a shame too, because the Editor that came later in their Action! language cartridge is superb! It certainly was laborious and a big part of my worry about how the video would be received to watch me renumber and stitch those pieces back together again. That was a trap of my own making though. When I was putting together the different examples of how to do Graphics, Plot, Setcolor etc, I wasn't thinking about using them again later (at that moment). It was only later when I was going to start piecing together a real program and setting out a code framework, did I realize that "Oh, why am I going to write those again? I just use them as they are in the big program." But then I wouldn't have had room to fit the new code in where I wanted it. I thought about just typing it all over again, but I was guessing/hoping that the renumber method would be faster? Either way, I put myself in my own pickle there. Which is all the more reason I'm glad I set up a framework now. In the future, there should be much less of that and when I am doing new examples, I will number them with the idea in mind that I might be reusing them again. Also, later in this series of videos I'll talk about even yet another way to avoid this problem I gave myself. As far as the NUM command goes, I'm afraid the real reason I don't use it (I forget what I said about it in the earlier video now) is that I am a very clumsy typist at times (which I'm sure you've witnessed plenty already!) and I can't seem to enter more than four or five lines in a row with NUM before I do something to knock myself out of it like arrowing up to a previous line to overtype some mistake I made Or deleting some characters and hitting Enter when I didn't mean to. Things like that. Maybe I'll try it again now I've been doing more editing than ever in MAC/65 and see if I can make it work any better for me. If I do, you'll get first credit! :)

    • @davidarlington1206
      @davidarlington1206 16 วันที่ผ่านมา

      I am in the process of uploading the next video and I think you'll like the fact I gave NUM another try and actually used it quite a bit!

  • @nickfolino8228
    @nickfolino8228 20 วันที่ผ่านมา

    Best coding practices generally include separating data from code. Your layout is currently data (variables as you call them), code, data. It is common to put all data at the end of assembly code so it doesn't interfere with program execution. I know I sound like a broken record, but as you define your style and start creating larger programs you'll see the benefits of having all of your data separate from your code. Where you put variables in the assembly source is where they go in memory, not like high level languages where the compiler will find a place in memory and manage it for you. I won't mention it again. Just trying to help you learn.

    • @davidarlington1206
      @davidarlington1206 20 วันที่ผ่านมา

      I appreciate your viewership and your comments, but this is unlikely to be changed in the future for a few reasons. 1) Some versions of MAC/65 have a bug (feature?) that it cannot properly assemble forward references to zero page locations. So they can't be put at the end. 2) When you say it is common to put all data at the end of assembly code, that may be true for assembly language code in general but that's not true for Atari assembly code. I went through a bunch of assembly listings from old Atari magazines looking for any kind of consistent coding practices. The one thing that WAS consistent, ironically, is that they put variables and equates at the top of the listings, not at the end. Nothing else was really consistent except this. :) The things that generally went at the end were like the things I mentioned, custom display lists, player/missle shape tables, strings, etc. 3) It could be bleed over from my years programming Action! or Java, but it's always been a practice for me there for DEFINES, variables etc to be declared at the top. They're referenced a lot and I want them together where I can find them easily. I mentioned this in a response to Alex, and I'll make this more clear in the next video. Any programming practices I recommend are not intended to be meant for coding assembly language in general, or for coding even just 6502 Assembly and not even meant for Atari assembly with the Assembler Editor cartridge. It's very specifically meant for programming the Atari 6502 with the MAC/65 development environment.

    • @nickfolino8228
      @nickfolino8228 19 วันที่ผ่านมา

      @@davidarlington1206 I'm not sure what you mean by this: 1) Some versions of MAC/65 have a bug (feature?) that it cannot properly assemble forward references to zero page locations. So they can't be put at the end. I'm not talking about zero-page locations, I'm talking about the location inside your program that you are reserving for data. When you use .ds or .byte it reserves a location in memory at the specific location within your program area. If you add another data byte at the top of your program, it shifts where your program will live in memory. That's why your start location keeps changing and you have to look to see what it's changed to. If you put it all at the end your code will always live at the same locations and not get shifted around in memory. Once you start coding larger projects, that moving around of the code location could cause issues.

    • @davidarlington1206
      @davidarlington1206 18 วันที่ผ่านมา

      @@nickfolino8228 As long as the start of the executable code is labeled properly, it doesn't matter where it actually starts. That's totally arbitrary. I only care about needing to know the address during debugging and it's always captured in the Symbols table where it moved to. Once it's finished the DOS run address takes care of it in its final form. You'll have to trust me on this but I'm not going to run into any issues. It's perfectly fine and acceptable and how people have been coding Assembly programs on Ataris for 45 years. What I'm doing is not new or radical.

    • @nickfolino8228
      @nickfolino8228 18 วันที่ผ่านมา

      @@davidarlington1206 I myself have been writing 6502 assembly for over 30 years, on Atari, Commodore, Apple and things I designed myself that use the 65xx family of chips. You have already had issues (not knowing where your data ends and code starts), that's why I brought this up to begin with. Everything you are doing is fine for simple programs, if you get into writing more involved code you'll see the benefits.

    • @davidarlington1206
      @davidarlington1206 18 วันที่ผ่านมา

      @@nickfolino8228 I guess we'll just agree to disagree on this one.

  • @takingbytes1265
    @takingbytes1265 20 วันที่ผ่านมา

    This is the video I have been waiting for somebody to make. I am really interested in what makes GPP. I would like to better understand the hows and whys of programming structure. For my money this is best episode in the series!

    • @davidarlington1206
      @davidarlington1206 20 วันที่ผ่านมา

      @@takingbytes1265 Thanks! That's actually great to hear since I was sure people would find it maybe boring or pretentious. I'm sure I'll have more to say and will refine things as we go.

  • @mickster150arcade
    @mickster150arcade 20 วันที่ผ่านมา

    great episode. It cleared up some questions I had.

  • @AlexEvans1
    @AlexEvans1 20 วันที่ผ่านมา

    You can use whatever style you like, but an equate is just creating a constant. it isn't a memory address or a value. The other way is what is typical for assembly language programmers. If you are of the mindset where you read equates as labels, then yes, just use equates as labels, but if you view them as just being constants, it is perfectly good style. Generally as far as style goes, it is a matter of having on, not a matter of what it is. Have one, follow it, but don't kid yourself that some (many) of the choices as to style are completely arbitrary.

    • @davidarlington1206
      @davidarlington1206 20 วันที่ผ่านมา

      The assembler, when it assembles the code, does maintain a difference in the assembly listing between a label that equates to a memory address versus pointing to a memory location that holds a value. That's what I was trying to point out there. Anyone can code the way they like, as I mentioned, but any confusion they generate for themselves (or not if that's what works for them) is up to them.

    • @AlexEvans1
      @AlexEvans1 20 วันที่ผ่านมา

      @@davidarlington1206 the thing is that this style isn't practical on some other assembly languages. If someone is used to programming for CPUs other than the 6502, it isn't helpful. If you find it helpful, do it. Your way is more confusing to me because I see reserved space and first think variable, not constant especially if it is only one or two bytes.

    • @davidarlington1206
      @davidarlington1206 20 วันที่ผ่านมา

      @@AlexEvans1 Ahh that's probably the disconnect. I'm not doing this series for other CPUs or other assembly languages or even other computers that use a 6502. In fact, I'm not even doing a series on Assembly Language on the Atari in general. It's specifically for Atari's Assembly Language with a specific Assembler/Editor IDE. I actually am in total agreement with you that my directions here probably do NOT and should not apply to other assembly languages or other processing chips. In that case, I am sorry and apologize for any confusion I'm making for you in that regard in this series.

  • @brianwild4640
    @brianwild4640 20 วันที่ผ่านมา

    I always comment my constants when I define them

  • @davidarlington1206
    @davidarlington1206 21 วันที่ผ่านมา

    The next video should have a lot of actual programming content, but it was important to me to lay out the ground rules for a set of standard practices I want to implement. At some point, I will also write up my coding practices and program structure notes and upload them to the GitHub account. There is one tiny mistake around 29:30 when I'm trying to use the REPlace command and I keep typing LDA #$60 instead of LDX #$60 but I catch it very quickly.

  • @STN-t5k
    @STN-t5k 25 วันที่ผ่านมา

    One thing that I'm not sure if understand is why constants like OPEN, CLOSE and PUTCHR are defined using .BYTE. I would expect them to be equates, as in OPEN=3, and then refer to it as LDA #OPEN. That would make both the instruction faster and the program shorter.

    • @davidarlington1206
      @davidarlington1206 25 วันที่ผ่านมา

      @@STN-t5k As I really get more into variables, I plan on explaining this in the next video. Saying OPEN=3 would mean the label OPEN refers to memory location 3 not the literal value of 3. Whereas .BYTE reserves a memory location and puts the literal value of 3 in that location which is what we want. These are only going to be referred to once (except PUTCHR) so not too worried about overhead here There are going to be some variables we do want in Zero Page for speed/efficiency also coming up next video.

    • @STN-t5k
      @STN-t5k 25 วันที่ผ่านมา

      @@davidarlington1206 But doesn't an equate like OPEN=3 means that every time it sees the word OPEN it will be substituted by a 3? If so, LDA #OPEN is equivalent to LDA #3, which is what is now being done in an indirect way by storing the value somewhere else when it could be put in the instruction. Is there a more appropriate way to define constants in MAC/65 then?

    • @davidarlington1206
      @davidarlington1206 25 วันที่ผ่านมา

      I'll discuss this more in depth in a future video but two things to note here. First, I think you're missing the point in why I created a label here in the first place. It was to make the program more readable. We only ever use that OPEN once and it's clear what it does. If it was a matter of making the program faster or smaller, I would have just used LDA #$03 not a label. Secondly, it is important to me to not just teach HOW to write code but also how to write code well and how to write code that is hopefully clear to understand, and to maintain. And while I see that even the System Equates in the Mac/65 manual use OPEN=3. But as far as I'm concerned, that's not good programming practice. In the business, it's what we would call a 'code smell'. My problem with it is if I'm looking at this code, what does OPEN=3 mean? It's ambiguous. Is it a memory location? A numeric constant? Either? Both? Depending on context that you have to look somewhere else in the code to figure out. In my code that I will be demonstrating Label=value will ALWAYS refer to a memory location. Label = .BYTE value will ALWAYS refer to a constant. Variables will either be Label .DS num (if I don't care where in memory it is) OR Label=value indicating a memory address There's no ambiguity there. You don't have to look at any other part of the program to figure out the proper context. Of course, everyone is free to code their own code the way that feels best to them, but if I'm teaching, especially at this early point, I'm going to show the examples of what I consider to be best programming practices.

    • @STN-t5k
      @STN-t5k 25 วันที่ผ่านมา

      @@davidarlington1206 You bring up a good point by stating that it is unclear if an equate refers to a memory address or a constant value. Ending up using an immediate as a zero page address by forgetting to add the "#" is a very easy mistake to make. I am still trying to find my own coding style, but I think equates will be addresses by default, and I'll add a prefix to indicate that they are constant values instead, maybe something like K_OPEN=3. Thanks again for taking the time to provide such detailed explanations, I've learned so much from you already and there is so much more to learn. Looking forward to the next video!

    • @davidarlington1206
      @davidarlington1206 25 วันที่ผ่านมา

      @@STN-t5k That's a good way to get around the ambiguity issue as well.

  • @STN-t5k
    @STN-t5k 25 วันที่ผ่านมา

    Hi Dave, these videos are great, thanks for taking the time to make such quality content. And I love that you are writing the code on the 800 itself instead of cross-assembling, gives us a glimpse of how programs were written back in the day. Keep up the good work!

    • @davidarlington1206
      @davidarlington1206 25 วันที่ผ่านมา

      @@STN-t5k Yeah, I'm a big believer in true old school hands on 8-bit coding! Thanks for the support!

    • @STN-t5k
      @STN-t5k 25 วันที่ผ่านมา

      @@davidarlington1206 Yes, definitely, I'm not very familiar with the Atari computers, but they seem very capable and a lot of fun. I've been using Altirra to follow the videos, looks like a great emulator, but makes me wish I had the real deal.

  • @caseycbenn
    @caseycbenn 25 วันที่ผ่านมา

    Didn't realize you were posting more of this... watching these today. Thanks :)

    • @davidarlington1206
      @davidarlington1206 25 วันที่ผ่านมา

      @@caseycbenn yes, the whole game is here in several videos!

  • @chriscription
    @chriscription 26 วันที่ผ่านมา

    According to documentation, BIT supports immediate mode starting with the 65C02. I always thought it was surprising that it didn’t in the original 6502.

    • @davidarlington1206
      @davidarlington1206 26 วันที่ผ่านมา

      @@chriscription My new Atari 130XE I'm pretty sure has a 65C02 but the 800 does not. The MAC/65 documentation notes additional addressing modes for BIT for 65C02 but does not mention supporting immediate mode just absolute,X and zero page,X.

  • @Thesecret101-te1lm
    @Thesecret101-te1lm 26 วันที่ผ่านมา

    Great video as always. Q: Is there any like predefined label or similar in MAC65 that tells where free memory starts? I.E. the best place to start to assemble to while assembling to memory rather than to disk. Sorry if I mix things up, but I think there is an off-by-one error re the length of the code, as 5000 is where it start and the label end points to where the last instruction is, rather than the first address past the program. Also the explanation of DEX/DEY mixup seemed a bit odd. I might have misunderstood what you said, but it's not an off-by-one problem or similar but rather the problem is that X gets loaded with way different values depending on which string to print.

    • @davidarlington1206
      @davidarlington1206 26 วันที่ผ่านมา

      1) not in the source code as a assembler directive, but you can use the SIZE command from the MAC/65 Editor to get the last address used by MAC/65 and the top of memory. You just want to give yourself some room over what MAC/65 uses/needs, and under the top of available memory, keeping in mind MAC/65 also needs space for a symbols table past its shown usage. So far, we haven't had to worry about memory issues on a 48K machine! :) 2) You're right, all my lengths are off by one, but the relative savings are the same. 3) Ah, good catch. My issue was the position on the screen was coming out wrong, printing in screen memory 1-12 instead of 0-11. But I needed change the LDY #$0C (which was OK when we were counting up and that was our stopping point) to LDY #$0B so it prints from positions 11 back to 0. I'll mention this in a future video. Thanks for your comments and viewership!

  • @brianwild4640
    @brianwild4640 26 วันที่ผ่านมา

    All good 👍🏻

  • @QuantumVirus
    @QuantumVirus 27 วันที่ผ่านมา

    Love it!

  • @davidarlington1206
    @davidarlington1206 27 วันที่ผ่านมา

    Only a couple mistakes here I think... 1) at 15:00 I say something about 3 colors in graphics modes 3 to 11, obviously that depends on the graphics mode, but you're not limited to 3. 2) at 31:30 I say Graphics 1 has 23 columns and 19 rows, which is a double mistake in that it's 20 columns and 24 rows. I mixed rows and columns and was counting from zero like the computer would do. EDIT: Couple other notes: The code is now up (fully commented) on GitHub. I DID change two things from the recorded version which I will catch up with in the next video. 1) I DID swap out CLC, ADC LUMNCE for ORA LUMNCE to save a byte! The low byte in the hue in the accumulator was cleared by the ASLs and the high byte in LUMNCE empty so OK to merge them with ORA. 2) To make it runnable from DOS, the last line was changed from .WORD START to .WORD BEGIN to reflect the new starting run address label I'm using now.

  • @SyntheToonz
    @SyntheToonz 28 วันที่ผ่านมา

    Line 610 says $0f. I think you meant #$0f. ???

    • @davidarlington1206
      @davidarlington1206 28 วันที่ผ่านมา

      Ooh thanks! Very possible. I'll correct that.

    • @davidarlington1206
      @davidarlington1206 27 วันที่ผ่านมา

      Yep, you're right. I've corrected it and will mention it at the start of the next video.

  • @davidarlington1206
    @davidarlington1206 28 วันที่ผ่านมา

    This is a redo of the video I actually deleted today. If you've already watched it, there's nothing new here (except maybe the bit about ICAX1 and ICAX2 from the Atari Technical Reference Manual). One error caught by a viewer is that at line 610 I do a LDA $0F when I want LDA #$0F. The first wrong version says load from Zero Page address $0F (not what I want) and the second correct version is load the value of 15 into the accumulator.

  • @AlexEvans1
    @AlexEvans1 หลายเดือนก่อน

    Some minor anal retentive things '/' is a (forward) slash, '\' is a backslash. Hex 'B' is 11, 'C' is 12, and finally calling '#' a hashtag is a neologism the term hashtag coming from calling '#' hash.

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@AlexEvans1 You'll see that as I go on, I catch most of these already especially the 11 and 12 B/C thing. I go back and forth on the # key thing LoL. What it was called contemporaneously back in the 80s or what are most people thinking today in 2024 when they see that symbol.

    • @y00t00b3r
      @y00t00b3r หลายเดือนก่อน

      octothorpe

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      ​@@y00t00b3rLOL. Perfect! Just don't expect to hear me say that in a video for the next hundred years or so! 😊

  • @stinchjack
    @stinchjack หลายเดือนก่อน

    6502 assembly, yikes! I'll stick to my comfy Z80 assembly language.

  • @FelipeBalbi
    @FelipeBalbi หลายเดือนก่อน

    43:25 I still think that if you do a PLA before your RTS, it should work with spartados 1.1. I’ll give that a go tomorrow morning.

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@FelipeBalbi let me know because it hasn't worked for me so far

  • @FelipeBalbi
    @FelipeBalbi หลายเดือนก่อน

    30:00 you could also lda, tax, and, beq, txa, and, beq, txa,…

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@FelipeBalbi I'm guessing when you left this comment, you hadn't finished watching the video yet. 😊

  • @nickfolino8228
    @nickfolino8228 หลายเดือนก่อน

    Is there a reason why you're putting all your data at the beginning of the program? If you put it at the end, the starting address won't change.

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@nickfolino8228 As I've mentioned in previous videos, I'm still finding my coding style for Assembly. I may start moving things around later but for now I like all the code in one place and all the non code together as well. As long as you're using labels and writing the code properly it won't really matter where the code actually starts.

    • @nickfolino8228
      @nickfolino8228 หลายเดือนก่อน

      @@davidarlington1206 You may try moving your data to a different location. You can add another *=[DATA ADDRESS] to the top of your program, then *=$5000 right before your code starts. That way your program always starts at $5000 and you won't need to worry that adding more data will move the starting location of your program. I like keeping all data in a separate file then just including it in the main program where I want it.

    • @nickfolino8228
      @nickfolino8228 หลายเดือนก่อน

      @davidarlington1206 You may try moving your data to a different location. You can add another *=[DATA ADDRESS] to the top of your program, then *=$5000 right before your code starts. That way your program always starts at $5000 and you won't need to worry that adding more data will move the starting location of your program. I like keeping all data in a separate file then just including it in the main program where I want it.

  • @brianwild4640
    @brianwild4640 หลายเดือนก่อน

    Just thinking would the bit instruction work better. Mind you I am only part way through watching lol

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      While it's true you can test the Accumulator value with BIT without changing the value in the accumulator, the big drawback with using BIT is that it does not support Immediate Mode. You can't do BIT #$02 or whatever, which makes it more awkward to use. (And would've distracted from the roundabout point I was trying to make about why and when you might need to use your own variables to stash things away.)

    • @brianwild4640
      @brianwild4640 หลายเดือนก่อน

      @@davidarlington1206 cool I never use bit just was a thought. Thanks for letting me know

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@brianwild4640 I think I'm going to show how to use it though now in the next video lol

    • @brianwild4640
      @brianwild4640 หลายเดือนก่อน

      @@davidarlington1206 that would be good for me

  • @brianwild4640
    @brianwild4640 หลายเดือนก่อน

    Better to just make yourself a cartridge no one who has an original Mac 65 cartridge will sell them can’t blame them

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@brianwild4640 These 4 in 1 cartridges are readily available it appears and are just as good as an original cart. Not everyone and especially me, can make their own carts.

    • @FelipeBalbi
      @FelipeBalbi หลายเดือนก่อน

      @@davidarlington1206 those cartridges are a shared project at pcbway. One can order the pcbs for about $5 USD.

    • @Thesecret101-te1lm
      @Thesecret101-te1lm 10 วันที่ผ่านมา

      @@FelipeBalbi A thing with the Atari though is that you need a case to hold the dust cover flaps open on the cartridge port. Or rather you need that with an XL as it has metal flaps that would short things on the PCB if you use a bare PCB in tbe cartridge slot. With the original 400/800 a bare PCB would work (I think?). Not sure about the XE models.

  • @FelipeBalbi
    @FelipeBalbi หลายเดือนก่อน

    woohoo 1st one here :-) Hey David.

  • @JamesGraham-f7y
    @JamesGraham-f7y หลายเดือนก่อน

    Most difficult game I attempted to learn

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      @@JamesGraham-f7y Hopefully the videos make it seem a little easier for you to pick up now.

  • @mickster150arcade
    @mickster150arcade หลายเดือนก่อน

    Looking forward to the variable episode. I am interested to see how that all works.

  • @davidarlington1206
    @davidarlington1206 หลายเดือนก่อน

    Thanks to beserkley who notes in the comments below that there is a problem with map setup where I forgot to rotate the Ledges one hexside to the right so that the path out of the Cavern hooked up to the Ledges. That would have made the map above a totally legal map. It happens when I shift the map around after construction and don't get all the tiles back in their proper orientation from initial setup. Spoiler Alert: The Amazon never goes to either of these tiles anyway so whew!

  • @berserkley
    @berserkley หลายเดือนก่อน

    is the Cavern tile legally set up?

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      The problem with the Cavern tile is not actually its placement but the placement of the Ledges next to it which should be rotated one hexside to the right. That would ensure all six clearings in the Ledges connect back to the Borderlands AND make the Cavern tile placement OK. What happens is I set up the map on an empty table and then do my best to rotate the whole map by hand to make room for the Setup Card etc. Sometimes when I'm hand rotating the entire map, a tile gets missed or shifted wrong like what happened with the Ledges here. It ends up not mattering in the end for this game because the Amazon never ended up getting close to either the Ledges OR the Cavern. If she had, I probably would have spotted this. Good catch! That's what happens when you don't have RealmSpeak to make sure it's legal! :)

  • @brianwild4640
    @brianwild4640 หลายเดือนก่อน

    Lmao I was shouting at the screen dex before dey lol😂

    • @davidarlington1206
      @davidarlington1206 หลายเดือนก่อน

      Such are the perils of coding live! But I wouldn't do it any other way. I think it's healthy for people to see mistakes and how to find them and fix them rather than being perfect all the time!

    • @brianwild4640
      @brianwild4640 หลายเดือนก่อน

      @@davidarlington1206 so true