Jump to content
IGNORED

Stella List


atari70s

Recommended Posts

quote:

Originally posted by atari70s:

i got alot of web info on 6502 yet i havent been able to comprehend. its gonna take a long long time. some things i get like color and to some extent the screen size (top to bottom LDY but i wonder to adjust the screen from left to right if LDX would work. now from the program playfield i see them doing STA PF0 [0]+3=3<23 then later on i see <29 and <49 and such. also i see they are adding 3 and 4 which makes me ask why? does it have something to do with the line

 

X= ( (Y-PlayfieldY) /4 )mod 7 well off to find some books

 

 

What you missed is that the only bit of code is the "STA PF0". The rest is a comment by the programmer to assist him in knowing exactly where he's at in terms of cycles and screen position.

 

STA PF0 ;[0]+3=3<23

 

That's basically saying something like "store to the background playfield register". We're at cycle 0, and this is a 3-cycle instruction. So we're now at cycle 3, and this line needs to execute before cycle 23. Boy that sure looks like my code. Remember, everyting after a semicolon is a comment, and is not part of the code itself.

 

LDY and LDX are nothing to do with screen positions. They are 6502 instructions to load numbers into the Y and X registers. LDY and LDX have *nothing* to do with adjusting the screen. They have nothing at all to do with the screen at all.

 

'2600 programming is like nothing you've ever seen before. Yes, it is going to take a long, long time.

 

Cheers

A

Link to comment
Share on other sites

they talk about LDY as "in a way one may say thats how the screen is drawn" in testing the lower number less text is shown and closer to 255 i go the amount of room one can fit ona screen seems to fill up. now looking at HELLO that prints on screen.i see some things like color you work off the digits on the bytes. now i get teh feeling that HELLO is being used by the program with careful byte counting is that the PF0 that i was refering to earlier. i see it on top of my page here.yet

 

PF0 is 4 5 6 7 now looking at the code since the notes are 0+3 = 3 would that be why PF0 starts at 4 and since the AND # 7 is that why it stops at 7?

Link to comment
Share on other sites

Atari70s: I think you may be jumping in a little too fast. Even the playfield demo requires that you have a pretty good understanding 65xx assembly. And assembly is VERY different from the high level languages you have experience with.

I went into the playfield demo with quite a bit of experience programming Commodore 64 (6510) assembly, and it was still tough.

 

My suggestion would be to get an intro book on 65xx assembly language. I learned most of what I know from the Commodore 64 Programmer's Reference Guide, which you can find on Ebay often. And there are many other books on this topic which you can probably find on Ebay or at thift stores.

 

-Paul

Link to comment
Share on other sites

There's another book, it's called something like:

 

Commodore 64 Machine Code for the Absolute Beginner.

 

It will help you understand how the memory addressing works and it even compares stuff to Basic on occasions. The only problem with that book is that it has more info than you need for just Assembler so it can get confusing some times.

Link to comment
Share on other sites

quote:

Originally posted by atari70s:

they talk about LDY as "in a way one may say thats how the screen is drawn" in testing the lower number less text is shown and closer to 255 i go the amount of room one can fit ona screen seems to fill up. now looking at HELLO that prints on screen.i see some things like color you work off the digits on the bytes. now i get teh feeling that HELLO is being used by the program with careful byte counting is that the PF0 that i was refering to earlier. i see it on top of my page here.yet

 

PF0 is 4 5 6 7 now looking at the code since the notes are 0+3 = 3 would that be why PF0 starts at 4 and since the AND # 7 is that why it stops at 7?

 

 

I put it as politely as I could in my earlier message. This time, not so politely... your questions are showing your complete lack of understanding of the fundamentals. You obviously have absolutely NO idea what is happening in that code, and are trying to guess your way around it. It's not black-magic. You need to develop an understanding of assembler, and the machine. And to do that, you need to start at square 1. There's no easy quick-start - you actually have to put in some effort.

 

As others have suggested, find a decent book on starting assembly code, and go from there. Your questions are so fundamentally clueless that they are impossible to answer - your underlying assumptions about how the whole thing works are just terribly wrong.

 

Great entertainment, though.

 

Cheers

A

Link to comment
Share on other sites

quote:

Originally posted by me to the Programmers board:

But PLEASE, PLEASE, before you do so, do your self a favour, and try to follow the very good suggestions of the various people in this and many other threads.

 

Else you could make yourself look like a complete fool.

 

Nothing to add.

Link to comment
Share on other sites

Atari70's, when I first started looking at assembler I had some of the same assumptions about the code as you do. I came from a Basic and Visual Basic background. Once you start reading the samples and documentation on what is going on, you'll lean that nothing is like it seems.

 

Almost none of the numbers you see in the code are actual numbers, normally they are pointers to memory locations on the Cart or in Local Memory.

 

Nearly everything you do in assembler takes 3 or 4 steps compared to what you can do in Basic.

 

If I had better working skill in Assembler I would give you some examples, but I'm sure I would end up looking silly.

 

With me, even though I still can't write code, there was a point that everything clicked. Hopefully it will work that way with you..

 

Forget everything you know about Basic.

 

Good luck .

Link to comment
Share on other sites

My 2600 programming advice for everyone:

 

1. Practice basic on an Atari or Commodore home computer. Buy lots of reference books, the C64 programmers guide is supposed to be great for any 6502 work.

 

2. Then start writing some routines in assembly, keep practicing, get very good at 65XX assembly.

 

3. Write a full C64, Atari computer, or 5200 game in assembly.

 

4 Move on to a 2600. Read the Stella programming manual at least 10 times. Write out notes. Learn the thing backwards and forwards. Learn the memory map completely too.

 

5. Study the playfield demo and the commented combat and adventure disassemblies until you understand them completely.

 

6. Modify these, starting with small changes

 

7. Study the Stella archives, good reading.

 

8. Place your new game on the web and amaze everyone.

 

If someone isn't willing to do all this, they shouldn't be surprised by any roadblocks. I haven't programmed the 2600 myself because of all the learning time needed.

John

Link to comment
Share on other sites

quote:


Originally posted by sway3:

Machine Language for Beginners

Personal Computer Machine Language for the Atari, VIC, Apple, Commodore 64, and PET/CBM Computers

by Richard Mansfield

 

ISBN 0-942386-11-6
[/url]


 

I just want to vouch that this is an awesome book and, along with Compute!'s Mapping the Atari, is what I used to learn assembly on the Atari 8-bit. I highly recommend it. I think I may still have a copy of this buried in a box somewhere, I'll need to dig it out. Will be useful when I start my own 2600 project someday.

 

..Al

Link to comment
Share on other sites

You didn't have to delete your moot post, nor do I think it was moot. With a reference book like Mapping the Atari, which is spiral bound so it sits flat on your desk, it's very handy to have a printed edition. There are many times when it's nice to having a physical copy of a book. It's much easier to carry around a book to read in various places, especially when you're not near a computer with internet access. Although I will say that having a laptop with a wireless connection does allow you to browse the internet from places we won't mention (and no, I'm not there now).

 

..Al

Link to comment
Share on other sites

Albert,

 

If I sounded offended, I surely wasn't! I truly appreciate the information you shared and I happily purchased the second book you plugged.

 

I deleted the post because I didn't want to encourage others to purchase a book that can be read online for free. Personally, I'm glad I got the book, but I do hope I have the newer version; however, should I have the old one, I'll just read the new one online.

 

Thanks again!

 

(PS ~ I have a friend who always talks to me on the phone from unmentionable places. I'll be talking to her and wondering why there is such a hollow echo on the line. Then suddenly there will be this rather unnerving sound and I'll be like, "What the hell was that??" )

 

edit: spelling

 

[ 12-06-2001: Message edited by: sway3 ]

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...