My First Apple I Program (15 Puzzle)

12 posts / 0 new
Last post
Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
My First Apple I Program (15 Puzzle)

Hi folks,

 

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!

 

Thanks,

 

 - Jeff

 

 

P.S. Should I have posted this in the "Development & Software Hacks" section instead? Let me know if I need to move it.

Online
Last seen: 1 hour 56 min ago
Joined: Sep 21 2017 - 11:10
Posts: 38
Re: My First Apple I Program (15 Puzzle)

Hi Jeff,

 

Nice game.  It must be a problem with the emulator because it works on my hardware.

 

 

Thanks!

Kevin

Offline
Last seen: 4 years 4 months ago
Joined: Feb 27 2020 - 16:06
Posts: 12
Have you tried it on the

Have you tried it on the latest version of POM1?  

http://pom1.sourceforge.net/

Offline
Last seen: 4 years 4 months ago
Joined: Feb 27 2020 - 16:06
Posts: 12
I gave it  a tru... it does

I gave it  a try... it does work under the current POM1 emulator.

 

Nice job!  :)

 

 

 

Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
Thanks

PROMetheus wrote:

Nice game.  It must be a problem with the emulator because it works on my hardware.

 

Thanks, Kevin! And a Level 5 win too... nice. :-)

Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
TomXP411 wrote:
TomXP411 wrote:

I gave it  a try... it does work under the current POM1 emulator.

 

Nice job!  :)

 

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.

Offline
Last seen: 4 years 4 months ago
Joined: Feb 27 2020 - 16:06
Posts: 12
Yeah, that's always a

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

ABCDEGFHIJKLMNO

YOUR MOVE: K

INVALID MOVE

ABCDEGFHIJKLMNO

YOUR MOVE: @

Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
Thanks for the play testing

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?

 

 

Offline
Last seen: 4 years 4 months ago
Joined: Feb 27 2020 - 16:06
Posts: 12
Hmm... redrawing the board

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

 

Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
New version just uploaded to

New version just uploaded to GitHub (same link as in first post).

 

gigatronTTL's picture
Offline
Last seen: 4 years 9 months ago
Joined: Feb 8 2020 - 14:06
Posts: 2
Runs well on TTL

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.

 

 

 

 

 

 

 

Offline
Last seen: 6 months 3 weeks ago
Joined: Feb 18 2020 - 16:59
Posts: 46
That is so cool to see it

That is so cool to see it running on the Gigatron! 

Log in or register to post comments