Jump to content
IGNORED

A Game Idea.


Atari Master

Recommended Posts

Directly from The Dig:

Depending on how the TIA chip reacts to these writes at various

timings, whole new kinds of graphical effects can become possible. Over 20 years since the VCS debuted and there may still be some effects which have yet to be discovered.

 

With so much knowledge about programming out there in modern times, it is fun to see how much can be done on this system...to get every last ounce of strength from the processor. Some techniques discovered recently probably weren't even thought of then by the Atari programmers themselves.

 

This has to be one of the main reasons I want to learn on the Atari 2600, as opposed to other systems.

Link to comment
Share on other sites

I ought to name my new game: Dasm strikes back

 

You'd go on a side scrolling journey for the long lost vcs.h

With it you'd fight against the Darth Vader (vcs system)

 

he'd have plenty of weapons to use against you, all starting with $ signs, and VSYNC laser attacks. He'd even use bright logos against you!

 

In the end you'd wind up in a binary world full of just 1's and 0's, and there you would find your long lost bicycle, named STELLA

Link to comment
Share on other sites

Hooray! you got it to compile!!! Congratulations dude! :D

 

I'm just glad you got down to the nitty gritty and actually got some idea of what the heck is the FRAMEWORK and ACTUAL STEPS that you're supposed to do and work in! .... Which is what I suspect you've been asking for this whole time. :)

 

Now, time to learn coding. ;)

Link to comment
Share on other sites

That's exactly what I've been doing, trying to figure out the process and framework for doing coding.

 

In the end, I WAS overthinking this process...it was easier than I thought it would be, but not simple either.

 

People were quoting me code, when what I was after was to understand how to use dasm, and making a bin file. The coding was obviously going to be the awesomely difficult part, and I just wanted to cover all the other bases first.

Link to comment
Share on other sites

Quote: For a simple beep, you should read the part about the AUDxx registers. Then with some assembler knowledge yoiu can start modiying "How to draw a Playfield".

**************************************

AUDC0 = $15

AUDC1 = $16

AUDF0 = $17

AUDF1 = $18

AUDV0 = $19

AUDV1 = $1A

 

Here is a section in Pacman disassembled code....

So if I stick this into the playfield code, I wonder what would happen...hmm might sound like pacman at all?

 

 

There's an AWFUL lot of three letter codes:

 

hmm:

STA (start probably)

BNE

LDA

DEX (dexetrim)? :)

 

JMP (this is a jump command I've heard about

before, interesting)

 

 

Can you tell me what some of these three letter

abbreviations do?

Link to comment
Share on other sites

Well you were absolutely right about the ORDER that a code has to go in.

 

I chose Pacman as my "victim".

 

I disassembled it, and went right in the middle of it, and cut out a whole section, and then I pasted it lower down the page.

 

I tried to keep the lines the same length and everything, and made it look like it would normally, just with the code in a different place.

 

I ran it through dasm, and it came out as a 4k file....

 

I ran it on my emulator, and I got a totally black screen :)

 

Dang, that makes this really hard.

Link to comment
Share on other sites

I binary hacked space invaders, and it worked...

 

I took out the entire top of the shooter, just deleted a bunch of X's.

The location was 0c0A through 0c13

 

Neat how the space ship is upside down in the binary :)

 

Pretty cool that it actually worked!

Link to comment
Share on other sites

There's an AWFUL lot of three letter codes:

 

hmm:

STA (start probably)

BNE

LDA

DEX (dexetrim)? :)

 

JMP (this is a jump command I've heard about

before, interesting)

 

 

Can you tell me what some of these three letter

abbreviations do?

These three letter codes are called mnemonics. You can easily find a complete list of them in the web. (e.g. http://www.geocities.com/oneelkruns/asm1step.html)

Anyway, here is a short list:

  • STA: STore Accumulator

[*]BNE: Branch when Not Equal

[*]LDA: LoaD Accumulator

[*]DEX: DEcrease X-register

[*]JMP: JuMP

Link to comment
Share on other sites

OK...for the Basic users following this thread, all the instructions detailed so far should be able to allow you to create your own games. More advanced techniques will be using redefined character sets, player/missile graphics, and display lists. But before those are outlined, here are three commands that allow you to unleash them from Basic :

 

POKE X,Y : This instruction will change the value in the specified memory location directly. If the computer's ROM happens to be using that location, this command will have no effect (since you can only write to RAM). X gives the location (0-65535), and Y gives the value (0-255). You are only allowed to use decimal values. Examples :

 

POKE 710,0

...changes the editor background color to black.

 

POKE 82,0

...removes the 2-character left margin from the editor.

 

NOTE : the Basic program itself also resides in RAM...so precautions must be used when POKEing around. If you POKE to a memory address that is being used by Basic, you could crash the computer. Free areas are listed at the end of this post, and instructions on how to make more of these will be explained later.

 

PEEK(X) : This instruction reads the value that is in the specified location. X specifies the memory location (0-65535). Example :

 

SCREEN=PEEK(88)+256*PEEK(89) : POKE SCREEN,17

...puts the beginning screen address into the variable SCREEN, and then writes the number 1 in the left corner (via POKE). A variable like SCREEN is useful to set up, since you can quickly POKE to any screen location by using this formula SL=SCREEN+X+40*Y. You simply add the horizontal location (X) and the number of bytes-per-line (40 in the editor screen) multiplied by the vertical location (Y).

 

USR(X) : This function allows Basic to jump to a machine language routine at the address specified by X. You can push variables onto the stack if you include them as arguments...i.e. USR(1536,D,Y). These arguments will be added to the stack as 2-byte hex values...so they must be within the range of 0-65535. Once in the machine language routine, these must be pulled off the stack using PLA instructions. The number of arguments passed from Basic is also pushed onto the stack (even if none are used)...so the first instruction you should use in the m/l routine would be PLA. Returning to Basic is done by using the RTS instruction. Example :

 

POKE 1536,104 : POKE 1537,96 : X=USR(1536)

...the POKE instructions place a small machine language program in memory. This program simply removes the number of arguments pushed onto the stack (required), and then returns to Basic. The variable X runs this "do-nothing" program.

 

FYI By itself, Basic normally leaves "page 6" untouched. This area runs from memory location 1536 to 1791 ($0600-$06FF). It's a good spot to try out some small USR routines. If your machine language routine requires zero page addresses, you can grab a few unused ones at 203 to 207 ($CB-$CF).

Link to comment
Share on other sites

trust me.. start with atari basic. Just trust me on this one.

Nukey, Liquid Sky, etc.

 

You realize right that Kaz still has NO IDEA what to do with the Atari BASIC code you're giving him right?

 

i.e. he has all these examples and ideas but if you go over there to his house and sit at his pc and watch him, according to his recent posts he still doesn't know where to actually TYPE this stuff out and get some kind of visible result. For all he knows, he should be trying to execute it in Microsoft Word! ;) At this rate he's having an easier time with 6502 assembly because at least he knows where to type his code (notepad or any txt editor) and what to do with it to try it out (i.e. assemble via DASM).

 

Maybe you should try to tell him how to get going first on Atari BASIC. And by that I mean: does he need an actual Atari 8-bit computer with a BASIC cartridge? Does he use an emulator? Which one? Does the emulator automatically start up so you can immediately start typing BASIC commands? If so, how do you save programs you may write for future editing? How do you execute them? (do you type "run"?). Etc.

 

Otherwise all the BASIC tutorials seem to go pretty much out the window without a context to test them in imho.

Link to comment
Share on other sites

Umm...we already posted that he should be trying these examples in an emulator or "the real thing", and also said that he should be trying them out instead of just reading about them. If he is, I dunno...but I've been going over the instructions in a way that shouldn't get him lost (at least as far as Basic is concerned). Once one language is understood, learning m/l would be easier.

Link to comment
Share on other sites

I don't fault their teaching methods, I just can't quite yet swallow that yet, but the threads aren't going anywhere, and I'll review them as I get more knowledge about where to put code.

 

I had heard about the Atari800Win emulator, and was going to download it, but then I was thinking that it wasn't the right programming language to try first because it would be the long way around to get to assembly programming for the Atari 2600. But then they said that it would be helpful to learn it anyway.

 

I love how brutally straightforward your posts are NE146, you get right to the heart of the matter. You don't assume I know anything beyond what I've already proven I know. That's how programming works, you have to hand hold the computer through all the steps, not assuming it knows the next thing to do...

 

I was getting mixed up, because I had Atari Basic in one ear, and my text files and dasm in the other. Atari Basic seemed like alot of added effort to download the emulator, when I had what I needed to make code already. And I couldn't make programs for the Atari 2600 with Atari Basic. But I understand it is being used in a teaching context too.

 

Explaining some of those three digit codes WAS very helpful, since that's what I kept seeing when I disassembled binary files.

 

I'm not gonna give up on this, not a chance...so you guys helping me figure this out won't be for nothing.

 

As far as "reading assembly docs" I have to go to the library for that. I was at that site called "Assembly in One Step", but when I copy pasted it to a word document, it loses its formatting, so printing it out was going to be a problem. Or I'd have to read it right on that site to preserve the nice tables.

 

And that's where I'm at with this.

Link to comment
Share on other sites

You're attempting to learn machine language on the 2600 right off the bat??

 

* hands a bottle of asprin to Kaz And a loaded handgun as well

 

BTW all of my "Basic" threads are regarding the Atari 8-bit computers. They have nothing to do with the 2600.

Link to comment
Share on other sites

kaz.. to preserve formatting in MS Word for the page you're probably talking about, http://www.geocities.com/oneelkruns/asm1step.html do this:

 

1. go to page. Highlight everything (ctrl-A) and copy it (ctrl-C)

2. Paste it in NOTEPAD. You can probably stop here, but if you want to use Word then;

3. Highlight everything again IN NOTEPAD and copy it.

4. Paste it into microsoft word.

5. Set your font to Courier or Courier new etc. (8 or 10pt)

6. Set your left & right page margins to around .5 inches or so

 

That should do it! Piece of cake.

 

The whole point to pasting into Notepad as a buffer is to ensure you just get the pure text, without any extra b.s. that comes with websites (like links, pics, whatever). One last thing... if your Notepad's formatting ALSO looks off, set it's font to FIXEDSYS.

 

-brutally straightforward NE ;)

Link to comment
Share on other sites

After reading this thread thru it stikes me its going nowhere - its just a mess of Atari Basic answers to 2600 coding questions!!!

 

Kaz - your posts reflect you've not gotten a grip on the basics of either programming in general and specifically 6502 machine code...

 

If you're real about learning to code the 2600 then get hold of ANY 6502 programming book and get going...

 

Don't worry which hardware you target - just try any 8bit 6502 based system via an emulator (8bit Atari, C64 etc) - try somthing that was accessible to a consumer (and therefore supported) rather than trying to get into the 2600 straight away.

 

The 2600 is hard to code for and not supported like a computer system for the user (since all coders for teh 2600 were pros). You'll find tons of 6502 tutortials and help for both C64 and XL machines on the web - once you've gotten the basics of 6502 under your belt and you can produce working code then maybe you should look up the 2600 and smash your head against its architecture...

 

I learnt to code on my trusty 800 - first in 6502 then some Action - I then did stuff for several 6502 based systems - just 'cos I knew the basics of 6502 - any machine was pretty easy to adapt my knowledge for...

 

I then moved on to 8086 (God I hated that) and now I prefer C++

 

sTeVE

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...