Jump to content
IGNORED

Odyssey 2 programming


atari2600land

Recommended Posts

The O2 uses the 8048 processor. so you'd need to bone up on it's instruction set. The TASM cross assembler supports the 8048 processor, so you can use that for all your programming efforts.

 

TASM 3.01

 

...and the O2EM emulator for testing...

 

O2EM emulator homepage

 

 

Technical specs etc. can be found on Dan B.'s site...

http://www.atarihq.com/danb/o2.shtml

 

 

A pretty active O2 programming forum exists here:

http://www.videopac.nl/forum/

 

 

More links for follow...

http://soeren.informationstheater.de/g7000/Index.html

  • Like 1
Link to comment
Share on other sites

These guys sell O2 homebrews so they might have some more info, they could also sell your game for you (if you decide to make one) I would send them an email. I met the owner at the MGC a few years ago and he was pretty cool, I am sure he would be happy to help you out if he can.

http://www.packratvg.com/

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...

Success! That was it. Next steps to take: Find out how to change colors and characters on the thing. Also, I need to learn assembly it looks like. From the very little experience with it, "jmp" acts like "goto". That's all I can discern from it. I saw a website that lists all the colors for the O^2 and how to program them in and letter values, but after googling, I can't seem to find it again.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

OK, Now I know how to get a .p file. Through trial and error, I discovered that if you drag an .a48 file to AS's icon and there's no programming errors, it spits out a .p file in the same folder. I then use the batch file I made to get a ROM. What I don't think I'll ever understand, though, is assembly. I think I'm just too dumb to grasp anything about it.

Link to comment
Share on other sites

OK, Now I know how to get a .p file. Through trial and error, I discovered that if you drag an .a48 file to AS's icon and there's no programming errors, it spits out a .p file in the same folder. I then use the batch file I made to get a ROM. What I don't think I'll ever understand, though, is assembly. I think I'm just too dumb to grasp anything about it.

 

But what you planning to do, is it Gosub? Let me know, maybe I can help you some way. I´m sure you can do easealy.

Edited by superbee
Link to comment
Share on other sites

OK, Now I know how to get a .p file. Through trial and error, I discovered that if you drag an .a48 file to AS's icon and there's no programming errors, it spits out a .p file in the same folder. I then use the batch file I made to get a ROM. What I don't think I'll ever understand, though, is assembly. I think I'm just too dumb to grasp anything about it.

Assembly isn't impossible, you just have to know the general rules about how computers work and then have all the documentation handy about the particular CPU and system you're dealing with.

 

With any computer system you're dealing with you'll need to know:

 

1. binary number systems. You need to know how to do binary math and how bits combine to make bytes (or larger numbers on other systems) and you need to know how bitwise operations work like AND, OR, XOR, etc.

 

2. Understand the concept of memory and address space. Each byte of memory has an address. I can store a value in byte location 432 and when I read location 432 later, the value will be there. Some areas of memory are for your use for variables, and some locations have a special purpose within the system you're using. The full range of possible locations are the address space. Not all locations may be available to you since the CPU may be capable of using more memory than is installed.

 

3. Understand the concept of a program. The CPU will do the operations it is instructed to do by following a sequence of numbers stored in memory (sometimes this memory is the same as your variable memory and sometimes the program has its own separate memory. The 6502 and 8048 are different in this regard). Assembly language is an easier to understand representation of the machine-language program so you don't have to type in raw instruction data to write a program.

 

4. Understand the concept of hardware registers. While the majority of available address locations will be memory, some will be special purpose registers inside other IC's. These will allow you to access the video, sound, inputs (like joysticks), and other special functions of the system. Generally, RAM is used to prepare the necessary values to put into these register locations to achieve the desired output from the system.

 

5. Finally, understand how a typical CPU allows you to read and write values from memory and perform operations on them. CPU's also have registers that preform special functions or allow you to quickly store a number for later use. Many CPU's have an Accumulator which is where the results of an operation are made available.

 

Here's a program on a simple made-up CPU to show the sort of things one might do (not fully 8048 compliant):

 

mov A, #3  this instruction would put the number 3 in the Accumulator (note the # means this is a number)
add #2     this instruction would add the number 2 to the 3 we've already got.
mov 1, A   this instruction would put the result of 5 into memory location 1 (note the # is missing)
and #1     this instruction would AND the accumulator (5) with 1, leaving us with 1.
mov R1, 1  this instruction would fetch the 5 from location 1 and put it in a CPU register called R1
add A, R1  add 1 to 5 so A=6.
shl A      shift A to the left. By moving all bits up one, we cause a multiply by 2. A now equals 12.

 

Anyway, once you get the hang of the CPU and study some existing programs you start to get the concepts you need to build your own program. Game consoles aren't always the best place to start because they're often not meant to be easy to program. Instead, they're made to be programmed by experts and cheap to produce. For example, anyone who tries to learn 6502 on a 2600 is insane, but someone who has written many 6502 programs can concentrate on just learning the peculiar requirements of the system.

 

At some point, when you're studying programming it will all just click and you'll be on your way.

Link to comment
Share on other sites

  • 3 months later...

 

But what you planning to do, is it Gosub? Let me know, maybe I can help you some way. I´m sure you can do easealy.

 

It's not Gosub, I don't think I'm ready to do that yet. It's actually my first program I programmed for the Atari 2600, Ants (or Alien Greed). I've made a website and blog entry about what I have done and am planning to do.

 

Sorry for the necroposting but I feel like returning to this now.

Link to comment
Share on other sites

 

But what you planning to do, is it Gosub? Let me know, maybe I can help you some way. I´m sure you can do easealy.

 

It's not Gosub, I don't think I'm ready to do that yet. It's actually my first program I programmed for the Atari 2600, Ants (or Alien Greed). I've made a website and blog entry about what I have done and am planning to do.

 

Sorry for the necroposting but I feel like returning to this now.

 

I saw you now a member of Videopac.nl, there you´ll find some incredible O2 programmers. I checked the Ants roms, unfortunatelly I don´t know much about random things. I don´t know if you see any problem if I give a Gosub start, maybe it could be usefull for you try to check how the things works.

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