Jump to content
IGNORED

Halo 2600 Source


Ed Fries

Recommended Posts

Hi Guys,

 

I thought I'd celebrate the one year anniversary of the release of Halo 2600 at the Classic Gaming Expo by making the source code available. It's not particularly cleaned up or well documented but I put it here, as is, with the hopes that it will help some future 2600 homebrew programmers, just as I was helped by others who posted their code. Please let me know if you have any questions and thanks to everyone for their kind words about this project over the last year.

 

-Ed Fries

halo2600.zip

  • Like 28
Link to comment
Share on other sites

Hooray :)

 

I see some tricks in there that I have yet to try, like early HMOVE.

Here's some readability feedback, if anyone feels like fixing:

* Consistent indentation would be nice.

* Maybe use the "org" and "ds" directives to prettify the RAM declarations.

 

Everything being in one file felt a little unusual. I use Visual Studio for my projects with dependencies on generators and include files to make things automagically generate/assemble when needed. Makes life easier.

Link to comment
Share on other sites

Hi Guys,

 

I thought I'd celebrate the one year anniversary of the release of Halo 2600 at the Classic Gaming Expo by making the source code available. It's not particularly cleaned up or well documented but I put it here, as is, with the hopes that it will help some future 2600 homebrew programmers, just as I was helped by others who posted their code. Please let me know if you have any questions and thanks to everyone for their kind words about this project over the last year.

 

-Ed Fries

 

Why not charge $32K for it ;)

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

What's the point of this?

PlayerTop
   LDA ScanLine	; 3
   CMP M1Pos	; 3
   PHP		; 3
   CMP M0Pos	; 3
   PHP		; 3
   PLA		; 4
   PLA		; 4

 

EDIT: And thanks for posting this. ;) :thumbsup:

 

I don't really remember all the details but... The code is for turning on and off the missles. The stack must be pointed at ENAM1 and it looks like I wanted it pointed back at ENAM1 again after I was done but I didn't want to destroy the value in the X register.

Link to comment
Share on other sites

What's the point of this?

PlayerTop
   LDA ScanLine	; 3
   CMP M1Pos	; 3
   PHP		; 3
   CMP M0Pos	; 3
   PHP		; 3
   PLA		; 4
   PLA		; 4

 

EDIT: And thanks for posting this. ;) :thumbsup:

 

I don't really remember all the details but... The code is for turning on and off the missles. The stack must be pointed at ENAM1 and it looks like I wanted it pointed back at ENAM1 again after I was done but I didn't want to destroy the value in the X register.

Ah, of course!

 

Thanks for the explanation. :)

 

EDIT: And that probably explains all the places that look something like this...

  ;waste 16 cycles
 pla
 pla
 pla
 pla

Edited by vdub_bobby
Link to comment
Share on other sites

  • 3 weeks later...
Sorry - I'm a 2600 programming newb - how would I compile and run this in an emulator? Maybe you could point me in the right direction? Thanks

If you just want to play the game, go here:

 

http://www.atariage.com/forums/topic/166916-halo-for-the-2600-released-at-cge-download-the-game-here/

 

 

If you want to edit the code and compile it, this might be helpful:

 

http://www.randomterrain.com/atari-2600-memories-tutorial-andrew-davie-01.html

Edited by Random Terrain
Link to comment
Share on other sites

  • 1 month later...

The indentation is off because it looks ilke there is a mix of hard and soft tabs in the file. It looks like Ed has set his tabs to 8, so if you set your editor's tabs to 8, it should look better.

 

Ed -- thanks for posting this. I hadn't paid much attention due to the fact that I'm admittedly not a big fan of Halo, but my kids are. So I'm going to share this with them in hope of getting them more interested in the older gaming machines like the 2600. Also, I was really impressed that you did this in 4k -- I had assumed that you used bankswitching initially. Great work!

Link to comment
Share on other sites

  • 2 years later...

I know it's bad form to resurrect an old thread for no reason, but WOW thank you for posting this. I was trying unsuccessfully to get the 74-cycle HMOVE working, but your example code helped me figure it out. I think I would have given up on it if I didn't have a functional example to work off of.

 

So thanks for posting this, and thanks for making a great game!

Link to comment
Share on other sites

  • 2 years later...

I had been wanting to run this on my unmodified Supercharger which requires not accessing ROM locations $FFF8 and $FFF9, but as is the code uses every single byte of the 4K cartridge.

 

Today, I took a look at the source code, and by making a small optimization I was able to trim 5 bytes from the code so that it ends at $FFF5.

 

I changed the end of SetRespx from

    STA 0,X	; RESPx
    RTS	

to

    STA 0,X     ; RESPx
    STA $10,X   ; HMPx
    RTS

then I changed the calls to SetRespx from

    JSR SetRespx
    STA HMM1
    RTS

    JSR SetRespx
    STA HMP0

    JSR SetRespx
    STA HMBL
    RTS

to

    JMP SetRespx

    JSR SetRespx

    JMP SetRespx

Edit: After setting NTSC mode in the source and re-assembling, the game runs flawlessly on my 6-switcher using the Supercharger.

Thanks for releasing the code, Ed.

Edited by CurtisP
  • Like 2
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...