8 ms·
Bill Budge posts Pinball Construction Set source code on GitHub
- joverholt 14y agoWow, I spent a lot of time with this game when I was eight or so. Brings back the memories. I'm pretty sure my Atari 800 is still in my parents basement. Just need to find a TV I can hook it up to...
- mcphilip 14y agoSame, but on the Apple II version. I remember making Rube Goldberg like pinball layouts where the ball would be guided through all sorts of paths and down to where you'd only have to hit it with the flipper every once in awhile. Pinball Construction Set, Spy's Adventure in North America, Robot Odyssey. So many classics on the Apple II that were fun and educational. I basically learned college level circuit design by playing Robot Odyssey as a child. For those curious, here's a part of a Let's Play trying to solve one of the earliest puzzles in the game: http://www.youtube.com/watch?v=uNa4wivnjgs http://www.youtube.com/watch?v=uNa4wivnjgs
- sbarre 14y agoWhat language is this project in? Github doesn't seem to know what the ".S" files are...
- tonyarkles 14y agoThat definitely looks like assembly :)
- sbarre 14y agoSome googling tells me it's assembly, but it's nothing I recognize... Thanks! you beat me to my edit.. ;-)
- jlgreco 14y agoLooks like a MOS Tech 6502? Seems pretty similar to a Zilog Z80. 8 bit processor with a 16-bit PC, though seemingly without the 16-bit paired 8-bit registers. Machines from when assembly was still fun.
- to3m 14y agoIt is 6502. (I'm not sure the 6502 counts as particularly much like a Z80?!)
- jlgreco 14y agoPerhaps not, I'm mostly just familiar with the Z80 though so I might just be seeing what is familiar to me. ;)
- fhars 14y agoIt is about as Z80 as an ARM Cortex is a Pentium M.
- zwieback 14y agoAgreed, I had a Z80 card in my Apple II and they are very different. I found assembly on the 6502 a little easier but the Z80 allowed me to run CP/M and that opened the door to a tone of SW.
- VonGuard 14y agoMOS Technology 6502B @ 1.79 MHz (NTSC version) @ 1.77 MHz (PAL version) It's the code for the Atari 800 version, I believe, so that's the processor. Some info on the assembly language for the 6502b http://en.wikibooks.org/wiki/6502_Assembly http://en.wikibooks.org/wiki/6502_Assembly
- Macsenour 14y agoback then we really only had Assembly as an option for games. It was a speed issue more than anything else.
- kabdib 14y agoAlso code space. The cartridges I wrote typically over-filled the code space by a factor of 25 percent, whereupon you crunched. Usually you wound up with a handful of bytes free. One cartridge I did had 6 bytes left, and another one had less than 20 and I was trying to think of something cool I could do with 20 bytes.
- ndrake 14y agoAccording to his latest Tweet, he's planning on going through the code and adding comments. https://twitter.com/billb/status/301403958415618049 https://twitter.com/billb/status/301403958415618049
- joezydeco 14y agoThere's some nifty tricks that Budge did in the code. Just looking at this, for example: LDA (PARAM),Y ;JUMP TO SELECTION STA DOMNU6+1 INY LDA (PARAM),Y STA DOMNU6+2 DOMNU6 JMP $FFFF Instead of creating a 16-bit lookup table and doing an indirect indexed branch (which I can't even remember if you can do on a 6502), Budge just modifies the code inline and lets the jump happen naturally. Very nice.
- MagerValp 14y agoThis is probably the most common way to handle jump tables on the 6502. If you're writing ROMable code you'll have to use indirect jmp (vector) instead of selfmod. It's more efficient to split the jump table into two halves though, with the LSB in one table and the MSB in another, and access it like so: lda param_lo,y sta vector lda param_hi,y sta vector+1 vector = * + 1 jmp $5e1f ; dummy address, written with selfmod
- kryptiskt 14y agoThe awesome blog The Digital Antiquarian had a piece on Bill Budge and PCS two weeks ago: http://www.filfre.net/2013/02/01/ http://www.filfre.net/2013/02/01/
- VonGuard 14y agoThis is spectacular. I really wish more great old game developers would do stuff like this. Not having the source code to the greatest games of our time is like having only half of the bible, or War and Peace. Or only half of Snowcrash or Neuromancer. Imagine! Bill's also not the only developer who has this stuff in the garage. I think the IP rights are just tricky to deal with, so few developers are comfortable dumping this stuff into github yet.
- nja 14y agoI totally agree! I'd love to see the source code for the original Rollercoaster Tycoon, for example. From what I understand, it's 99% assembly with a few parts in C to handle media. It would be awesome to try to grok that!
- jacobparker 14y agoWell, uh, you can view that alleged 99% with a disassembler ;) (missing labels, comments, etc. though.)
- VonGuard 14y agoWell, without the comments, it's almost not worth it. They're like directors commentary.
- btown 14y agoFor assembly, comments are more like the audio track for a drama, rather than directors' commentary. Sure, without them, you can see when entities are happy/sad/angry, but you have no idea why those things happen.
- jacobparker 14y agoI don't think I agree with that. Reading foreign assembly isn't that bad unless it is being intentionally obscured. It definitely takes time to decipher things but at the same time you really learn what's going on :)
- tmoertel 14y agoAlthough it's the source code for the Atari 800 version of PCS, it seems to have been built on an Apple II. From MAKE1 [1] for example: CALL -151 3F2:69 FF 5A BLOAD GPAK.OBJ,A$1300 BLOAD CDRAW.O,A$2480 BLOAD PCSA800.PIC,A$2B00 BLOAD DLIST.O,A$4910 BLOAD SWAP.O,D2,A$4A00 BLOAD TST.O,D1,A$4B00 BLOAD GOATARI.O,D2,A$4B45 BLOAD BOOT.O,D2,A$8E00 BLOAD BOOT2.O,A$8E80 BLOAD ZAP1.O,A$8F00 BLOAD DOWNLOAD.O,D1,A$300 The first line invokes the Apple II "System Monitor", the second writes 3 bytes to memory at address $3F2 (the effect of which is to tell the computer to enter the Monitor whenever someone resets the computer from the keyboard), and the rest load binary files into different memory areas. I'm guessing it's all to build an image to be written to disk. (See [2] for more on the System Monitor.) [1] https://github.com/billbudge/PCS_Atari800/blob/master/Disk1/MAKE1 https://github.com/billbudge/PCS_Atari800/blob/master/Disk1/... [2] http://apple2.info/wiki/index.php?title=System_Monitor#General_Intro_to_this_reference_and_System_Monitor http://apple2.info/wiki/index.php?title=System_Monitor#Gener... EDIT: added additional details
- thought_alarm 14y agoIt looks like he used an Apple II as the development environment, which is straight forward since both machines use the same CPU. The .S files are assembled to 6502 object files. The "makefile" loads each object file to a specific area in RAM, then Download.o transfers the contents of RAM to a waiting Atari 800 via serial connection.
- js2 14y agoAnd a development session would have looked somewhat like this: http://www.youtube.com/watch?v=CDPlfqpgW8c http://www.youtube.com/watch?v=CDPlfqpgW8c (I may miss the Merlin assembler, but I don't miss disk ][ drives at all.)
- treerex 14y agoWow, that brings back so many memories: thank you for posting this. I loved Merlin.
- 14y ago
- johansch 14y agoHere's Bill demoing this game in 1984: https://www.youtube.com/watch?feature=player_detailpage&v=h-evE4a6crg#t=780s https://www.youtube.com/watch?feature=player_detailpage&...
- drudru11 14y agoIt is cool that people are doing this (Karateka, etc.)
- lysol 14y agoI wish that someone would find Stuart Smith and get him to do the same with Adventure Construction Set.
- binarycrusader 14y agoI'm thankful the author did this, but there's no copyright notice or license. Obviously I can assume it's copyrighted, but it would be nice to have the explicit declarations.
- tptacek 14y agoJust for whatever it's worth (I assume you know this, but for the class): with no explicit statement, the default in US and EU is "all rights reserved".
- gojomo 14y agoTrue. And yet: the author has overtly placed it in a public place normally understood to be for sharing. At the very least, people can reasonably assume an implicit permission to do the usual things that are done with Github public repositories: fork at Github, create local copies, create derivatives with the intent of sharing back to the original, etc. And, if he's using Github's free plan, that's only available for projects that are "open source", a term with a fairly well-understood meaning in our profession. So he's likely also implicitly represented to Github that whatever the formal license, it qualifies as 'open source'. The author could be confused. It could be a trap. He could probably withdraw any of these implicit permissions by taking the right explicit future steps. But in the meantime, people don't have to fear normal copying and sharing based on a default 'all rights reserved' assumption. It's probably OK, and even if the author changes his assertions later, penalties for copying during this 'implied consent' period are unlikely.
- tptacek 14y agoIs there something in the Github TOS that suggests that? Because otherwise I think your beliefs about people's reasonable assumptions are the opposite of true. Although I agree with you that his intentions are probably not at this point to take advantage of his copyright on the code. :)
- gojomo 14y ago
- beernutz 14y agoThis is great! I really wish there were a developer commentary track that you could listen to as you read the source code. Would be really cool to hear what they thought about with specific routines, or neat hacks they used to make things work in small memory footprints like that.
- lec 14y agoThis is a masterpiece of early programming. I am very grateful he is posting the source.
- unwind 14y agoThis is cool. Not so sure about the practice of committing object files to source control, but I guess it makes sense in a "the more, the better" kind of way, at least. As a side note, I must say that as a former (contracting) developer at an EA studio, it's a very interesting feeling to see the programmer (the programmer, as in "the one") of a recent release sit next to EA's boss and talk about the title. Things have certainly moved on a bit, since then. :)