Falcon Mainframe
You are the Falcon Mainframe!
A group of programmers have handed you their programs - which is to say decks of punch cards. Your job is to run their programs by executing the instructions step by step.
Follow the in-game manual to learn how to execute each instruction. When you encounter a HALT instruction, press HALT to end the program and submit your results. Run each program successfully to move on to the next.
Made in Godot for Ludum Dare 60.
Special thanks to my protege Zac who chipped in. He learned a lot ;-)
How to Play
The mainframe is composed of 3 modules - the register, instruction, and memory modules. Fetch instructions from the instruction module and do what they say. That's all there is to it. Don't forget, most instructions need to you increment the program counter before you fetch the next instruction.Register Module
The register module contains 8 registers. Each register contains an unsigned 8-bit value. There are 4 general purpose registers (R1-R4), a program counter (PC), a frame pointer (FP), a stack point (SP), and a return address (RA).Instruction Module
The instruction module is where you read punch cards. Press the FETCH button to fetch an instruction. The instruction you fetch will be whatever the PC register is set to. If you're having a hard time reading the cards, press the hint lightbulb to get the easy-to-read-and-helpful-for-testing readout of the code. The manual button will explain what each opcode does.Memory Module
The memory module is just a big box of data that you can read from and write to. To read from memory, put in an address and press LOAD; the loaded data will be written to the data field. To write to memory, put in both an address and data and press STORE.State of the Game
I spent the last day writing and debugging the final program (RE-CURSED) and boy was it cursed. Turns out writing raw assembly is prone to errors. Who'd have guessed? Anyway, I wanted to respect the jam and cut off developing RE-CURSED before the jam ended. I _think_ I fixed everything in it, but I'm not positive. That level might not work quite right. The automation that checks if your program executed properly does terminate, so that's a good sign!I would have liked to spend more time on art (especially sound) and general polish. I think having the memory highlight the addresses of the frame pointer, stack pointer, and return address would have been a helpful visualization.
I also would have liked to make the parser a bit better. I kept it pretty basic (rightfully so, IMO), but that means it can't handle comments or labels and operands can only be either registers or immediates. E.g. I can't do something like ADD $R1 10. I'd have to SET another register to 10 and then use it to add. As a result some of the programs are a little more verbose than they need to be.!



Comments6
> Then increment PC
Ahhh, that's what I was missing. The How To Play doesn't mention that PC = program counter, though I suppose it's obvious in hindsight. Still, goes to show the importance of a foolproof tutorial.
Neat concept, though I'm already predisposed to enjoying toy assembly programming languages. There's something about little books of instructions in games that's enjoyable. I'm glad you put the lightbulb button in to auto translate the punchcard, it would've been tedious otherwise. To be honest executing the program instead of writing it kinda is tedious as a concept, but it's still a fun exercise for a bit.
Since the complexity is way higher than I expected, it takes time to actually do the sequence. That's just the very old technology of computers.
After I understand this game, I enjoyed playing it! Nice entry!