Lunar Landing like it's 1978
My first attempt at programming was a Lunar Lander game back in 1978. I used an Apple II which had arrived at my school and then was promptly stored in the cleaner's room (!!) to gather dust.
I used to be let in after school and on weekends to try to make this thing work. Fortunately the manuals were great and pretty soon I had written a BASIC Lunar Lander.
Wouldn't it be nice to go back to those times and get enjoyment from a game that mostly happens in your head?
Well the successful building of a KimUno recently (video and blog) has meant an opening to go back to the future and play with these games/applications again.
I hadn't been too successful trying to shove code into the memory available, due in no small part to the byzantine memory map of this replica.
But I did think I could succeed if I made a ROM and programmed the game at the source, straight into the Arduino Pro Mini that drives the whole deal. These are the steps I thought might result in a Lunar Lander on a KimUno.
1. Find a good Lunar Lander written in 6502 style for the Kim1.2. Use an assembler to make the Hex code for the game (see below).3. Convert the Hex code to the array format used by the KimUno code with the help of my old friend Nedit (xNedit).4. Change the roms.h, cpu.c and config.h files of the KimUno project code to insert the game ROM at $3000.5. Compile and upload to the Arduino Pro Mini6. Practise my landings.
Here's the Hex code if you wish to try it yourself!
3000: A2 0D BD CC 30 95 D5 CA3008: 10 F8 A2 05 A0 01 F8 183010: B5 D5 75 D7 95 D5 CA 883018: 10 F6 B5 D8 10 02 A9 993020: 75 D5 95 D5 CA 10 E5 A53028: D5 10 0D A9 00 85 E2 A23030: 02 95 D5 95 DB CA 10 F93038: 38 A5 E0 E5 DD 85 E0 A23040: 01 B5 DE E9 00 95 DE CA3048: 10 F7 B0 0C A9 00 A2 033050: 95 DD CA 10 FB 20 BD 303058: A5 DE A6 DF 09 F0 A4 E13060: F0 20 F0 9C F0 A4 A2 FE3068: A0 5A 18 A5 D9 69 05 A53070: D8 69 00 B0 04 A2 AD A03078: DE 98 A4 E2 F0 04 A5 D53080: A6 D6 85 FB 86 FA A5 D93088: A6 D8 10 05 38 A9 00 E53090: D9 85 F9 A9 02 85 E3 D83098: 20 1F 1F 20 6A 1F C9 1330A0: F0 C0 B0 03 20 AD 30 C630A8: E3 D0 ED F0 B7 C9 0A 9030B0: 05 49 0F 85 E1 60 AA A530B8: DD F0 FA 86 DD A5 DD 3830C0: F8 E9 05 85 DC A9 00 E930C8: 00 85 DB 60 45 01 00 9930D0: 81 00 99 97 02 08 00 0030D8: 01 01 00 00 00 00 00 00
And here is the video showing the final project and all the little funny bits along the way!
No comments:
Post a Comment