Jump to content
IGNORED

Where did our homebrew authors learn to program?


shadow460

Recommended Posts

Serious question here, and I ask because I would like to learn how to program the 7800. I'd like to try porting Reactor over to the system.

 

It's not going to happen overnight--right now it's a far off dream of mine. I know jack squat about programming the thing, although I'm fluent in AppleBasic and I can write simple scripts and HTML. I've looked through several of the tech docs Curt provided links to in the trak ball thread, but I'm a hands on person and I'll be able to apply the information there when I'm writing code.

 

Also, a CC2 may be out of my reach right now. I don't know what options that leaves me for testing programs, but at this point, I'm putting the cart ahead of the horse.

 

I'm also interested in Master System/Game Gear programming, too.

Link to comment
Share on other sites

Well, I certainly can't speak as an accomplished 7800 homebrew developer (I'm still a 7800 homebrewer-wannabe-in-training), but here is a rather long post I wrote on the subject earlier this year in which I provided links to some resources that I've found helpful.

 

Put briefly, the first thing to do is to become familiar with the 6502 processor, and then to look through the 7800 documentation and tools to get an idea of how the system works and what it can do. You can test your code in an emulator, but it's also a good idea to try it on the target hardware. Aside for the CC2, the best option I've found (and the one I use) is Eckhard Stolberg's DevOS system, which allows you to upload programs to the 7800 from a PC parallel port.

 

It's certainly helpful that you have some programming experience already, especially on a classic 8-bit system like the Apple ][; somebody approaching the 7800 from more of a modern, object-oriented programming mindset would find the system and its limitations a lot harder to get used to.

Link to comment
Share on other sites

I programmed the Atari XL before so the 6502 part wasn’t very hard for me.

Had some books in the past and made much learning by doing.

The rest was to understand the 7800 architecture.

Unfortunately there isn’t very much documentation about it but some guys at AA where very helpful.

Actually the concept is very straight forward if you get the idea behind it.

I found it very unique and confusing at the beginning because it’s different from all platforms I knew.

However you should start to learn 6502 Assembler there are tons of documentations and code on the net.

An emulator and a cross assembler is enough for the start.

Just start and have fun!

Link to comment
Share on other sites

I had used assembly before on the x86, but needed to learn 6502. These were the documents I found useful:

 

http://www.geocities.com/oneelkruns/asm1step.html

http://www.6502.org/tutorials/6502opcodes.html

 

It's a simple instruction set, but it's easy to mess up the addressing modes or the literal/indirect syntax in dasm. Those are the most common mistakes I make. Without an assembly background it would obviously be harder to learn, but if you're going to learn assembly then 6502 is as approachable as anything else.

 

7800 graphics was the more confusing thing to learn:

http://www.whimsey.com/atari_docs/7800_Software.pdf

But it all makes sense when you've digested all the info. The hires modes are confusing to just about everybody so don't worry about those until necessary.

There are also more 7800 documents out there, but the above is the most useful for programming.

 

I've never programmed the 2600, and I don't think that experience is necessary. I've never done sound, but I'm sure it won't be hard to figure out.

 

Getting something to happen on the 7800 takes a lot of code, so it's not a very forgiving system to get started with. If your startup code is flawed, you won't get any visual feedback at all. Expect to spend a lot of time getting your initialization code debugged. You may want to refer to other people's published code as a guideline.

You don't really need to test on the real hardware at first. The emulator is fine for getting started on something.

 

I'm curious if the A8 computers might be an easier way to learn assembly, but I've never had experience with them myself.

Link to comment
Share on other sites

Perhaps I should acquire an Atari computer, then.

Until then, I'll dig into the emulator.

 

What's the cost on the Dev OS, RAM cart, and the link cable? I'd have to add that cost to a PAL 7800 console, as I don't want to tear into my near mint one unless I really have to.

 

More questions...what board did Absolute use? I'm not very familiar with their games at all. Did Froggo build their own board or did they rip one off?

There's a wealth of information about the nine (eleven now) Atari boards, but I don't see much about the two Activision ones and I need to keep looking for the other two companies.

I'm asking this because in the end, I'd like to be able to produce homebrew games in different cart shells. For example, if I were to port Front Line over, I might use a Coleco shell for it. Or I might go the expensive route and have molds made for Froggo shells so I could use them just to be different. :)

 

I've got the cart ahead of the horse already, so let me turn the cart backwards now. I think a game like Reactor will require a Pokey board, with its emphasis on its music. I can't imagine it going over 32K. Then again, Ken got awesome sound out of the TIA with some of the Beef Drop demos.

Edited by shadow460
Link to comment
Share on other sites

What's the cost on the Dev OS, RAM cart, and the link cable? I'd have to add that cost to a PAL 7800 console, as I don't want to tear into my near mint one unless I really have to.

I don't know about the DevKit costs (I've never been all that interested in taking yet another 7800 out of commission), but a Cuttle Cart 2 would allow you to do 7800 development without any modifications to your 7800. Unfortunately, you'll have to find one used. They were about $200 new.

 

There's a wealth of information about the nine (eleven now) Atari boards, but I don't see much about the two Activision ones and I need to keep looking for the other two companies.

7800 boards are a bit different from 2600 boards. For one, they can address a lot more memory, so they don't need the fancy bank switching routines that differentiate the 2600 boards.

 

I'm asking this because in the end, I'd like to be able to produce homebrew games in different cart shells. For example, if I were to port Front Line over, I might use a Coleco shell for it. Or I might go the expensive route and have molds made for Froggo shells so I could use them just to be different. :)

I'm not an expert, but from what I hear, finding a supplier for manufactured cart shells is not as easy at the moment as it once was. Most homebrews are being pulled made out of repurposed Atari shells. Since the Activision shells weren't much different than the Atari shells, I wouldn't worry about this at the moment.

 

I think a game like Reactor will require a Pokey board, with its emphasis on its music. I can't imagine it going over 32K. Then again, Ken got awesome sound out of the TIA with some of the Beef Drop demos.

You REALLY don't need to worry about all this stuff until after you're testing on a 7800. Develop in an emulator in the meantime, and you'll be fine. :)

Link to comment
Share on other sites

Chad's got a mailing list on his site. There's no indication yet of the CC2 going back into production, but if enough people are interested, that may change.

 

That's the best option, as compared to having a second 7800 sitting around for development (I'd probably sell the one I've got now if that were the case) or having an EPROM burner sitting around and having to wait for it to work.

 

I did send Chad a message.

Link to comment
Share on other sites

Chad's got a mailing list on his site. There's no indication yet of the CC2 going back into production, but if enough people are interested, that may change.

 

That's the best option, as compared to having a second 7800 sitting around for development (I'd probably sell the one I've got now if that were the case) or having an EPROM burner sitting around and having to wait for it to work.

 

I did send Chad a message.

I also have my doubts about you getting a new one. However, there are quite a few people who are willing to part with their used unit. If you're really serious about this (which is probably a determination that should be made AFTER you have something running in an emulator ;)), you can probably obtain one by putting a WANTED request over in the marketplace area. :)

Link to comment
Share on other sites

What's the cost on the Dev OS, RAM cart, and the link cable? I'd have to add that cost to a PAL 7800 console, as I don't want to tear into my near mint one unless I really have to.
The DevOS system was probably intended to be a do-it-yourself project; it does require you to desolder the BIOS chip and modify the console for an EPROM, but this really isn't as difficult as you might think. I've actually installed EPROMs in three of my 7800s with both the stock 7800 BIOS and the DevOS BIOS on them, and I attached a selection switch so I only have to use the DevOS when I need it.

 

Come to think of it, I can burn you a BIOS EPROM for your console, and I've got a spare 32K POKEY RAM cart and link cable as well. PM me if you're interested in them; they would certainly be a lot less than a CC2.

 

I do agree than an 800/XL/XE computer would be easier to start with than a 7800, mainly because there are a LOT more development tools and documents out there for it. You also won't have to deal with the data structures required by the MARIA chip, which (as others have said) can take some getting used to, or the somewhat primitive TIA sound. I chose the 7800 myself because it's a greatly underappreciated console that has some nice capabilities and deserves more support, and because it presents an interesting technical challenge without being as difficult to master as the 2600.

Link to comment
Share on other sites

I wonder if something like DevOS has ever been built into a cartridge?

I'll probably look up the parts and mods I need later on after I get to the point where I'm ready to tackle this project.

 

It's pretty late and I read up on hardware until my brain was about fried. I now know more than the average gamer would even care to know about the 7800, and I still don't know nuthin' compared to ya'll. But I'll get there.

I checked out the other post that was linked to here, and I'll get an emulator installed on here within a few days.

 

I don't have the tools to desolder chips anyway. My soldering iron is on its last legs and there's no way I'd take it to anything this old.

If you saw the console, you'd know why I am hesitant to open it again anyway. I got lucky--it plays everything I've ever tried in it and it looks brand new, so I don't wanna ruin that.

 

I wonder what I should expect to be able to do with the 6502 at first? Am I simply going to be making it crunch a few numbers, or should I expect to have the kill walls drawn already?

 

Also, was the 512K Pokey cart ever used for anything?

Edited by shadow460
Link to comment
Share on other sites

i would go for a800 which gives quicker results. when knowing how to do things on that platform then you get quicker into the 7800 as they are both atari machines but are different in their approach... and when you started to code on a800 you get a better approach what nice stuff you can do with the 7800 beast... ;)

 

maybe my source code for a not finished Simon Says-look a like homebrew gives you a start on the 7800...

 

http://www.s-direktnet.de/homepages/k_nadj/a7800.html

Link to comment
Share on other sites

As people have indicated, the place to start learning 6502. Fortunately, since so many consoles & computers have 6502 CPUs, there's a wealth of info out there (e.g. 6502.org). However, as gdement said, getting the 7800 to simply display something is a lot more difficult than print "Hello World!" So you might want to start with a different platform until you are comfortable with 6502 ASM.

 

Fortunately, 7800 emulators exist so you don't need to invest $$ in buying a CC2 or building a DevOS machine. And I know there are lots of willing testers once you have anything semi-functional.

Link to comment
Share on other sites

Fortunately, since so many consoles & computers have 6502 CPUs, there's a wealth of info out there (e.g. 6502.org). However, as gdement said, getting the 7800 to simply display something is a lot more difficult than print "Hello World!" So you might want to start with a different platform until you are comfortable with 6502 ASM.

See, I figure in three months, he'll either drop 7800 development or learn to program the 2600. Since there's so much more info on the 2600, it will be a lot easier to start with that (especially since the 7800 shares a lot of other chips), then work his way up to the 7800.

 

Myself, I kind of got tired of everything from the MARIA's vamperic draw on computational resources, to the memory hole oddities, to display list management, to difficulties in creating graphics, to code signing issues, etc. It's all kind of over the top in complexity, and a bit frustrating to work with. Better toolchains would help, but wouldn't completely remove the difficulties of working with the machine. I figure I'll get back into it soon enough, but my current project is designed for the 2600.

Link to comment
Share on other sites

Next question, which is the best 6502 emulator to get, and how do I go about compiling it?

There are two choices for the 7800 (that I'm aware of):

 

1. ProSystem

2. MESS

 

I personally prefer MESS, but neither one simulates the MARIA chip's DMA-cycle-stealing, so be careful about how many cycles you use.

 

Since you're new to the 6502, I will throw in a recommendation (for better or for worse) to try creating a few programs for the 2600 in Stella first. Stella has an incredible built-in debugger (press '~') that allows you to step through the program one instruction at a time. It even shows you the values of all the registers, TIA variables, and memory slots.

 

There are also a ton of Atari 8-Bit computer emulators out there, but I'm not that familiar with them. Hopefully, someone can give you a recommendation there. Here's a (possibly incomplete) list of them.

Link to comment
Share on other sites

:roll: All right, if you insist, I'll try programming the 2600 first. *sigh* Some people.

 

:D Just kidding.

 

Really, though, I know jack squat about the 2600. If I can build on it to work with the 7800, and if Stella does prove to be a viable 6502 emulator, then I'll use it.

 

Soon it might be time for me to move this over to the programming forum.

Now I might not be programming 7800 games in three months, but I'll be working toward that goal. I expect it to be a lot longer than that before I get Maria to draw my first images on a screen.

The cycle stealing is a big reason why I considered getting a CC2 or a DevOS machine to learn 7800 programming.

 

Let me learn 6502 first, though, and I'll see how well I can work with an emulator. Once I begin on the 7800, though I would like to do things right the first time, or at least as close to it as I can get. That'll probably mean using the actual hardware.

Link to comment
Share on other sites

If I can build on it to work with the 7800, and if Stella does prove to be a viable 6502 emulator, then I'll use it.

Stella is a 2600 emulator, not a 7800 emulator (although it does have a nice built in debugger). As others mentioned, you may want to learn 6502 using an emulator (with a good debugger) for a different, well documented, console or computer. Nothing more frustrating than staring at a blank screen wondering what's going on.

 

I wouldn't worry much about overloading the 7800 (unless you're doing an Elite port....). Reactor shouldn't have any issues.

Link to comment
Share on other sites

I wouldn't worry much about overloading the 7800 (unless you're doing an Elite port....). Reactor shouldn't have any issues.

*cough* DLL management *cough*

 

I do believe the #1 newbie mistake is to chew through too many cycles by recreating this every frame. Something they might be able to get away with on an emulator, but not on the real system. ;)

 

Feel free to correct me if I'm wrong. :)

Link to comment
Share on other sites

How about using the 7800 itself, then to learn 6502? I forgot that my 7800 and my supercharger work together. Perhaps I can use Stella to learn the basics, and then run simple programs in 2600 mode with the Supercharger. As long as I tread around certain addresses, I shouldn't have too many problems.

I've got the makewav program, too.

 

Perhaps I could get my feet wet with a simple game, then gradually explore the Supercharger (something I'd like to learn anyway), and move up into 7800 programming.

 

I'll tell you, though, once I get to actual hardware, I won't want to leave it. That means once I get comfortable with a little 2600 programming and the 6502, I will obtain a DevOS system.

 

The only issues I'd see on Reactor might be with the music or the vortex core. The arcade vortex is very well detailed IMO, much more than the solid red Parker vortex (though that one looks meaner).

Still, though, it's a long way off for me. If I even begin coding any 7800 games within six months, I'll be amazed.

Link to comment
Share on other sites

I'll tell you, though, once I get to actual hardware, I won't want to leave it.

You obviously don't know the 2600/7800 very well. :P

Well, I won't want to leave actual hardware as long as I stay focused on that system. If it's a real pain to program for, I may start from the ground up on something else.

Link to comment
Share on other sites

How about using the 7800 itself, then to learn 6502? I forgot that my 7800 and my supercharger work together. Perhaps I can use Stella to learn the basics, and then run simple programs in 2600 mode with the Supercharger. As long as I tread around certain addresses, I shouldn't have too many problems.

 

Just realize that you can't develop 7800 games using a SuperCharger (or any other 2600 style cartridge) on an unmodified NTSC 7800. The BIOS tests will fail and lock the system into 2600 mode.

 

I'll tell you, though, once I get to actual hardware, I won't want to leave it.

I dunno. I don't know if I could have developed Leprechaun without the Stella debugger or Skeleton without Z26.log. Real hardware is great for playtesting, not debugging.

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