Jump to content

Photo

Pitfall! binaries and source code


45 replies to this topic

#1 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,531 posts
  • Location:Germany

Posted Sat Feb 20, 2010 12:56 PM

Today is a special day for me. I'm releasing both the binaries and source code for
my remake of Pitfall! for the Texas Instruments TI-99/4A.

This is revision B, which runs on a bare console without 32K memory expansion.

Binaries
Attached File  pitfall_rev_b.zip   203.74KB   167 downloads

Source code
Attached File  pitfall_rev_b_source.zip   487.65KB   187 downloads

The source code is fully documented and includes instructions on how to assemble the game.
I'm hoping it's showing how much fun programming TMS9900 assembly language can be. :)

If you like this, you also may want to checkout my SPECTRA arcade game library.

Enjoy :D

#2 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Sat Feb 20, 2010 4:06 PM

Truly great stuff man. :). I think the documentation of the source code is so crucial here. It really helps me understand this language much better. Thank you for your work, Filip!

#3 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Tue Feb 23, 2010 11:49 AM

Filip, could you do a short writeup on exactly how you built this thing? I wanted to go into much more detail in our RTM article, but didn't think the venue was right for it. Most of those readers want reviews of Mega-man, not a bunch of technical stuff... I know you have several entries at your site--maybe you could copy and paste them here for the Atariage group?

Edited by Opry99er, Tue Feb 23, 2010 11:50 AM.


#4 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,388 posts
  • Location:Castaic, California

Posted Thu Feb 25, 2010 11:18 AM

Most excellent! Most people would horde such code. It is nice to have complete examples of games like this, very rare indeed. I can't say thanks enough.

Matthew

#5 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Fri Feb 26, 2010 3:28 AM

Filip, could you do a short writeup on exactly how you built this thing? I wanted to go into much more detail in our RTM article, but didn't think the venue was right for it. Most of those readers want reviews of Mega-man, not a bunch of technical stuff... I know you have several entries at your site--maybe you could copy and paste them here for the Atariage group?


I'll add it to my to-do list Owen.
This may take some time though, work has been a killer lately and most likely will stay that way for the next few months.

#6 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Fri Feb 26, 2010 3:29 AM

Most excellent! Most people would horde such code. It is nice to have complete examples of games like this, very rare indeed. I can't say thanks enough.

Matthew


Thanks, I'm hoping it can inspire other homebrewers to give the TI a try ;)

#7 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Fri Feb 26, 2010 7:36 AM

And a marvellous job you are doing of spearheading our movement. If I'm right and all the tumblers fall into place, we TIers will rule southern Guam by the year 2035. Keep our fingers crossed. :)

#8 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Thu Mar 4, 2010 9:53 AM

Hey Filip... In looking through your source, (and I'm by no means a competent AL decipherer) it appears that you've utilized several of these subroutines over and over by branching back to them
over the course of your game... Essentially, if I'm understanding this correctly, once you get a whole bunch of these subs built, you maintain a very organized structure by simply branching and linking--- almost like a GOSUB in XB. Sorry, I'm new to this but I'm starting to make heads and tails of it all by reading a bit of your source here. Amazing comments man/-/ it really makes the while thing make so much more sense!!! This doesn't appear to be much more difficult than XB, once you have a big set of subroutines built up--- it's just a matter of understanding how to manually build a CALL CLEAR from scratch, and such. :)

#9 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Fri Mar 5, 2010 1:08 AM

Hey Filip... In looking through your source, (and I'm by no means a competent AL decipherer) it appears that you've utilized several of these subroutines over and over by branching back to them
over the course of your game... Essentially, if I'm understanding this correctly, once you get a whole bunch of these subs built, you maintain a very organized structure by simply branching and linking--- almost like a GOSUB in XB. Sorry, I'm new to this but I'm starting to make heads and tails of it all by reading a bit of your source here. Amazing comments man/-/ it really makes the while thing make so much more sense!!! This doesn't appear to be much more difficult than XB, once you have a big set of subroutines built up--- it's just a matter of understanding how to manually build a CALL CLEAR from scratch, and such. :)


Hi Owen,

that is exactly what I'm doing, calling subroutines from the main program.
The "basic" subroutines I'm using are all documented. check the SPECTRA reference manual here.

The main difference compared to an extended basic program is that I'm actually running the whole game from a driver table.

Basically what I have is like an extended basic array and each entry in the array contains the address of the subroutine to call
(+some additional info like when it should be called, etc.)
The main program constantly loops over this array, checks if its time to call the subroutine and calls it.
The good thing is that you can fiddle with this array while the program is running.
So it is not a problem to add/remove/rearrange the array from inside a subroutine.

That way you can do things like pause the game, slow down, add new animations, etc.
Check out the "Timers" section in the mentioned SPECTRA reference manual (starting page 64).
It should give you a pretty good idea of what is going on ;)

#10 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Fri Mar 5, 2010 8:28 AM

:). Sweet. AL is not seeming so foreign to me now. I'm still not ready to use it for LOBR, but man, I'm getting close! With teachers
like you and Matthew, I might consider it for the sequel--- if I ever finish this one!!! :)

#11 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,388 posts
  • Location:Castaic, California

Posted Wed Sep 15, 2010 7:40 AM

I don't play games much and when PITFALL! originally came out (in 1982) I could not get it because, well, I had a 99/4A and the game did not exist for the 99/4A until a few months ago. ;)

Now that I have had to actually *play* the game to make sure the carts sold on the CHC store are good, I have to say Retroclouds' conversion is absolutely AWESOME! Admittedly I had not actually played the game prior - *hangs head in shame* - BUT I downloaded though, and looked at the title screen in Classic99!?!?

If you have not actually played the game, even a little, you really need to! I can't get over how smooth the whole thing runs, and now I'm going to have to go read the source code because he did things in the game that I don't know how I would do.

I just wanted to throw this out there and give my two cents on the game. It is fantastic! Retroclouds nailed it! Even if you don't like games very much, you should play it a little just to see what I'm talking about.

Matthew

#12 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Wed Sep 15, 2010 7:47 AM

It is quite an amazing feat. All in 256 bytes scratchpad.... :)

#13 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Wed Sep 15, 2010 11:47 PM

I don't play games much and when PITFALL! originally came out (in 1982) I could not get it because, well, I had a 99/4A and the game did not exist for the 99/4A until a few months ago. ;)

Now that I have had to actually *play* the game to make sure the carts sold on the CHC store are good, I have to say Retroclouds' conversion is absolutely AWESOME! Admittedly I had not actually played the game prior - *hangs head in shame* - BUT I downloaded though, and looked at the title screen in Classic99!?!?

If you have not actually played the game, even a little, you really need to! I can't get over how smooth the whole thing runs, and now I'm going to have to go read the source code because he did things in the game that I don't know how I would do.

I just wanted to throw this out there and give my two cents on the game. It is fantastic! Retroclouds nailed it! Even if you don't like games very much, you should play it a little just to see what I'm talking about.

Matthew



Thanks, I'm really glad you like it :)

When I started looking for a game to port to the TI-99/4A, I checked several candidates.
In the end I picked Pitfall! because it looked easy to convert. I had to play it a lot to learn it has quite a few subtle tricks.
The one I like the best visually-wise, is how the rope swings between the tree leaves. If you look closely, you'll see how a few pixels
of the rope appear between the "holes" in the tree tops.
The colecovision programmers did a nice job there, overlaying sprites in a a clever way.

As far as the source code is concerned, there is plenty I would do differently now. First of all I think it's important to decide
what your "target" platform will be. Meaning, are you heading for a cartridge version that runs without memory expansion or are
you targetting a disk version with 32K memory expansion. I started from the disk version and shoehorned it to fit in the cartridge space.
That shows in the source code, but in the end I was pretty pleased with it.

:)

#14 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,261 posts
  • Location:Cookeville, TN

Posted Thu Sep 16, 2010 8:54 AM

I have a Pitfall cart--- I won it. Hehe--- anyway, this game project is partly responsible for renewed external interest in our machine here on atariage and elsewhere. I remember a couple of years ago when this game was still in the works--- there was virtually no interest from most over at the stiff-ass list... But the atariage homebrew thread was hoppin!! When the game was completed and eventually put into cart form, the list came around--- but the die was cast for the Atariage model. Here, people are actually excited and positive about projects. That's why we're all here. :)

I've said it before, I'll say it again... Filip is a pioneer---

thank you for Pitfall, your source code, the RGPC, and your continued support for programmers and new developments.

Now we have Adamantyr with "Realms of Antiquity," Codex's Magellan and his Flyguy which is on it's way to assembly immortality--- Matthew's tutorials and future book--- Marc Hull's brilliant XB offerings and SID card, John Chase has been on a TEAR with his games and hardware... There are too many to mention. And alot of this forward motion can be traced back to the excitement generated by Pitfall. :)

#15 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,923 posts
  • Location:Denmark

Posted Tue Jun 21, 2011 1:14 AM

Did you see this nice review ? :)



#16 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Tue Jun 21, 2011 4:19 AM

Yeah, he really must have done a *lot* of playing for finding out these subtle little differences. :)

Some of them are bugs. Like the slow jump after switching screens :cool:

#17 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,388 posts
  • Location:Castaic, California

Posted Tue Jun 21, 2011 8:10 AM

Wow, that is a really nice review! Very very well done. Does anyone know who the guy is?

As for the differences, I noticed a few of them, like the slowing when jumping from screen to screen and the logs starting in a position such that you get nailed when you enter a screen when running to the left. But, I have not played any other version in over 20 years, so I had no idea if those were aspects (or bugs) of the originals.

I suppose some of the things he mentions, i.e. the really close collision detection, slowing when you jump, speed of the traps, etc. could be used to incorporate a difficulty system if you wanted. Just a thought.

The reviewed has other TI titles on his YouTube page, so I'll be checking those out now... :-)

#18 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,844 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Oct 16, 2011 3:43 PM

Is there anything special about the beige non-v2.2 console (QI, I believe) which would cause some of the graphical elements to not appear during the title sequence? In particular, he has not face or legs, and half the swinging vine is missing. My concern is there is something actually wrong with my console.

#19 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Mon Oct 17, 2011 4:22 AM

Not that I'm aware of. Any chance you can take a picture of the reported behaviour?

I remember that the title screen was kinda tricky to implement, because it uses half bit-map mode and has some overlapping sprites.
Would expect that -if it runs-, it should run the same on all stock TI-99/4A's.

Could imagine it acts kinda weird on a 9938 or 9958 VDP.
But I think Matthew was able to make it run fine on the F18A.

What happens if you get passed the title screen. Does everything look ok then ?

Edited by retroclouds, Mon Oct 17, 2011 4:23 AM.


#20 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,844 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Oct 17, 2011 9:46 AM

Not that I'm aware of. Any chance you can take a picture of the reported behaviour?

(...)

What happens if you get passed the title screen. Does everything look ok then ?


Yeah, I will get a picture tonight. Everything seems to work fine after the title screen.

#21 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,388 posts
  • Location:Castaic, California

Posted Mon Oct 17, 2011 12:32 PM

I use Pitfall! as one of my main test carts. It runs fine on the F18A. I'm not sure how it would run on the 9938/58 since I ignore most of the 9938/58 registers. My enhanced features use registers that the 9938/58 don't use. However, the 9938 datasheet states that it is "software" compatible with the 9918A, so if you don't do any "rule breaking" in your use of the 9918A, then your software will run on the 9938 just fine.

#22 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,844 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu Oct 20, 2011 4:24 PM

Today I hooked up the beige console again, but everything worked fine. Not sure if the last problem was a cartridge seating issue, or if my new hardware is flakey. I guess time will have to tell as I do not have the time nor patience right now to troubleshoot it.

#23 APB 99/4A OFFLINE  

APB 99/4A

    Space Invader

  • 49 posts
  • Location:St. Louis MO and Kokomo IN

Posted Mon Nov 21, 2011 8:32 AM

Yes, me and my kids bought the last Pitfall cart at the fair this year and was playing till 4 a.m. Very nice job! I never new the TI could manage so well with all the action on the screen. Clearly my best cart game in my families collection. I like that you posted the codes, would realy like to start learning how to program on the TI other then Basic and Extended Basic.


#24 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,531 posts
  • Location:Germany

Posted Tue Nov 22, 2011 12:47 AM

Thanks! Glad you like it. :)

#25 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,766 posts
  • Location:Eagan, MN, USA

Posted Tue Nov 22, 2011 8:08 AM

Clearly my best cart game in my families collection.

I absolutely second that :)




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users