I've finished my first attempt at an Apple I assembly language program (apart from "Hello, World!" of course), but I've only ever run it in an emulator. I developed it using Will Scullin's awesome Apple 1js and it works fine there. I dug up some old Java version of Pom1 which loaded it fine but won't run it. Not sure if the fault is mine or the emulator.
Anyway, here's the github page for it: https://github.com/JeffJetton/apple1-15-puzzle
And a direct link to the Monitor-pasteable text: https://github.com/JeffJetton/apple1-15-puzzle/blob/master/puzz15.txt
If anyone has the gumption to run it on actual hardware, that would be awesome. Let me know how it goes!
P.S. Should I have posted this in the "Development & Software Hacks" section instead? Let me know if I need to move it.
Nice game. It must be a problem with the emulator because it works on my hardware.
Have you tried it on the latest version of POM1?
I gave it a try... it does work under the current POM1 emulator.
Nice job! :)
Thanks, Kevin! And a Level 5 win too... nice. :-)
Thanks, Tom! Yeah, I tried to compile the latest version of POM1 (since I'm on a Mac) but ran into some snags with an SDL library or something. Probably need to dive back into that and figure out what's going on. Wouldn't hurt to have two different emus to test things on.
Yeah, that's always a challenge with source distros.
FYI, I also tried your game on the MiSTer Apple I core, and it works there, as well. The only problem I have with the game is that when you try to enter an invalid move, the game sometimes locks up. I'm not sure, but I think it's when I enter an invalid character, like the space bar. I'll play with that a bit more and try to track down the specific failure.
You might also want to re-print the game board on an invalid move - I can see a situation where making a mistake or a stuck key will scroll the game board off the screen, then the user can't figure out what he's supposed to be doing. So it would look like
YOUR MOVE: K
YOUR MOVE: @
Yeah, I bet it's the space bar and I bet I know why.
(It's a potential bug that I knew couldn't happen in the early versions of the game, due to the way I was handling keyboard input. But then I changed the input routine to accomodate choosing difficulty levels, and, well...)
I really tried to print as little as possible to the Apple 1 screen, since it's so slow. That's why I didn't want to redisplay the board needlessly on an error. But I see your point. Hmmm... what if I had it keep track of consecutive errors and only reprint the board after , say, every eight or so of them?
Hmm... redrawing the board after a few failed attempts is not a bad idea. You might also redraw the board on null input (when the person just presses RETURN without entering anything.)
New version just uploaded to GitHub (same link as in first post).
Thanks Jeff. To make this run best under Apple-1 emulation on my TTL computer, I just needed to replace the BCD counter update and adjust the line breaks a bit. Both are limitations of the emulator of course. It was very easy to do and it is a joy to read the source code.
For its simplicity the game is surpisingly fun to play. Very well done.
That is so cool to see it running on the Gigatron!