Jump to content

disjaukifa

Members
  • Posts

    2,127
  • Joined

  • Last visited

  • Days Won

    4

Blog Entries posted by disjaukifa

  1. disjaukifa
    I stayed with the tutorials on Random's website for a couple of hours and got to lesson 12 understanding most of what I was doing but I found myself constantly confused at some portions of the code I would be looking at.
     
    While the tutorial I'm currently going through is good, and very informative, I feel it was missing some key elements/just brush over them with minor detail that I still need to study up on and get clarification on as well. The following information I feel should have been the first thing taught and really hammered into the student, if you have a solid understanding of the following, I feel the rest will come very easily.
     
    From my current understanding, which could be incorrect as I am still learning, the 6502 has 3 registers (I consider them variables, but that is just how I think about it) that you can us, A, X, and Y. The operations you have for each variable is as follows:
     
    A:
    sta <- store a into the following
    lda <- load a with the following
    ina <- increment value stored in variable a
    dea <- decrement value stored in variable a
    A has other oprerations as well, and as the author discribed it, its the "workhorse" of the 3 registers available on the 6502 (really the 6507) CPU.
     
    X:
    stx <- store x into the following
    ldx <- load a with the following
    inx <- increment value stored in variable x
    dex <- decrement value stored in variable x
     
    Y:
    sty <- store x in the following
    ldy <- load x with the following
    iny <- increment value stored in variable y
    dey <- decrement value stored in variable y
     
    The other thing I'm still trying to wrap my mind around completed is how you use these registers with the registers from vcs.h. Such as the following:
     

    ldx #0 stx COLUBK
     
    I guess for me I have to reverse my thinking of how these registers work. I'll explain with the following example:
     

    ldx #0 really means the following in x = 0 stx COLUBK really means the following COLUBK = x
     
    However in my mind, I would think ldx would be used to retrieve the value of x. Same thing for the stx which really means "store x in" and is used to take the value in the register x and put it int he following register COLUBK, in my mind it would be reverse, I want to think of it as storing a value into x.
     
    While this might seem minor and trivial, it was a small yet important concept for me to wrap my head around last night and this morning. I guess this just shows how I have to learn different from others which is fine.
     
    The more I think about trying to program in machine language, the more I'm applying natural language to each statement to help me retain this information in my memory.
     
    ldx is "load x with the following"
    stx is "store x in the following"
     
    I'm thinking of going through my books tonight to learn how loops, if statements and other basic operations that are pretty much universal in all languages, meaning Java, BASIC, C, Assembly all have IF statements its just learning the way the specific language requires you to setup the statement, before I continue with the rest of the 2600 programming tutorial on Randoms website. I think I will have a stronger grasp of the Machine Language if I go about it in this manor.
     
    If I've made any glaring errors in this please let me know so I can correct myself and learn!
     
    Thanks
    Disjaukifa
  2. disjaukifa
    Hey Guys,
     
    As some of you know I'm in the process of releasing my first homebrew game called Candy Catcher which I'm very excited about and have been extremely happy with the responses I have gotten from the game so far. However during the development of that game, i quickly realized not only the complexity of my statements I was making in batari Basic, but also the amount of ROM (Read Only Memory) space my code was taking, I had some statements that were easily pushing 50 ~ 75 bytes. That doesn't sound like much but when you only have 4096 bytes to work with, you only have ten of those statements, you have used a 1/5th of your available ROM space. I was limited to 4k, easiest way for my to make my game into a cartridge and release what I was considering a budget title. I had many more ideas for additional features in Candy Catcher that never saw the light of day because of ROM limitation issues.
     
    So for my next game that I'm keeping quite until I have a playable demo to present, I decided to learn assembly to reduce the amount of ROM space my code is taking and to give me great control of the number of objects that appear on the screen and to give me more flexibility with the speed and execution of my code as well as cutting down on the ROM space my code requires.
     
    I'm going through Atari 2600 Programming Tutorial posted on Random Terrain's site, getting my machine setup and learning the basics of Machine Langauge from the beginning. I also have Machine Language For Beginners by Richard Mansfield and 6502 Software Design by Leo J. Scanlon as references as I go.
     
    I'm going to be doing all my development on my Mac Mini Server as its my main desktop (Mirror Raid Harddrives are freaking awesome) and I'm not having to run a VM of Windows XP to do development of my game which is also nice which I did for Candy Catcher.
     
    My goal is to update this blog weekly with examples of what I have figured out and with tips to help others along as well.
     
    Thanks
    Disjaukifa
  3. disjaukifa
    Well, after working on it for a few hours, I have another build for you! Two in one day. I have collision detection set for when you hit a wall, the player sprite disappears and you get two options. If you press the reset button it takes you back to the title screen. If you press the fire button, it will immediately start a new game.
     
    Not quite sure what I'm going to implement next, been fighting to wrap the logic behind Bit operators in my head. I will this however, this game is tiny compared to my older version and I'm not even really using any variables yet, so I'm not sure what I was doing the other time, but I can say I'm having a lot more fun because I'm not under such a huge constraint to have variables available.
     
    Heres the latest build:
     
    Atomic_Meltdown_2011y_09m_12d_2322t.bas.bin
     
     
    Thoughts? Suggestions?
     
    Thanks!
  4. disjaukifa
    Well today I'm doing something I never really wanted to do. I'm backing up all my old Batari Basic code for Atomic Meltdown and starting over from scratch. Its my hope to free up the slew of variables that I'm currently using
     
    As it stands, PAC-MAN-RED will be doing all the graphics, and I will be doing the rest. My Hope is that tonight I will be able to post an update from my game, even if it is complete bare bones.
     
    Here is what I've done so far, its not much but its a working update. I've double checked the scan lines and they appear to be below 262 if I setup my Stella correctly.
     
    Atomic_Meltdown_2011y_09m_12d_1743t.bas.bin
     
    Feel free to leave any comments/feedback on what you think about the game!
     
    Thanks
×
×
  • Create New...