Jump to content
Ed Fries

Halo 2600 Source

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 25

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

* Consistent indentation would be nice.

 

Indentation is (more or less) consistent if you view it in the editor it was created in. Which is... wait for it... Notepad.exe!

 

-EdF

  • Like 2

Share this post


Link to post
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

Share this post


Link to post
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:

Edited by vdub_bobby

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

I figured it would be (even worse) bad form to ask a question in the developer forum without searching through the forums for an answer first, which is where I found this (and a number of other threads that helped clarify the issue).

 

:)

  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

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