uP-8: Microprocessor by Spaceman

ASSEMBLY PROGRAMMERS WANTED:
x2A Industries is looking for talented individuals to develop for our exciting new uP-8 Microprocessor Platform. We need YOUR help to develop the necessary software suite to control our rover as it explores an exciting, and oddly small, new world.
NOT FOR THE FAINT OF HEART:
We are not joking. We are providing you with a fully simulated CPU with a proprietary instruction set. The challenges that you must solve can only be completed using your own willpower and creativity. Well, those and assembly.
THE MOST MODERN ADVANCEMENTS IN MODERN COMPUTING ADVANCEMENTS:
x2A Industries is at the forefront of technological advancements. Some have said that technology such as what we have created for you today would not be seen until the distant year of 1985. However, we refused to accept their inferiority as our own. We did what was impossible and created these advancements today, April 24, 1977.
THE END OF THE FLAVOR-TEXT:
Hey, everyone. Finally reached the end of yet another exciting Ludum Dare. If you are still reading this, then you have successfully trudged through all of the text I had too much fun writing. Anyway, as I said, uP-8 is a game where you program real assembly to control a simulation of a rover. You have to use your own creativity to create solutions to each level. The catch is that you have limited memory, registers, and lines with which to work. Give it a whirl and let us know what you think! Oh, and also, we have included a manual. Not only do I want you to check it out because I spent an entire weekend writing a 20-page manual, you will not be able to finish even the first level without it. Good luck and Godspeed.
The WebGL version is now available! There are some limitations to the WebGL version: The game only supports fullscreen play in WebGL; The "Tab" key does not work in WebGL; WebGL 2.0 is required; Internet Explorer and Microsoft Edge are not supported.
I recommend the desktop version for the best experience.
BUGFIX CHANGELONG
VERSION 1.2.1
Updated the manual to correct minor factual errors and decrease rudeness.
The standalone download now includes a copy of the manual. This was accidentally left out in the last update.
VERSION 1.2
Fixed a bug where completing level 7 didn't take you to the "YOU WIN" screen
Fixed a bug where the portal animation did not play on every level
Fixed a bug where the CRT display effect did not render properly on WebGL.
Added WebGL version. ONLY FULLSCREEN MODE IS SUPPORTED.
VERSION 1.1
Fixed a bug where TUL wasn't properly updating the rover's facing direction in emulator memory
Fixed a bug where the main menu wasn't properly locking the mouse (use the exit command or quit button to close the game)
Fixed a bug where using LOC with a register or memory location would cause a RUNTIME ERROR to occur
Fixed an uncountable number of rendering bugs in WebGL (WebGL version coming soon)
KNOWN BUGS
Pressing ESC will cause the cursor to disappear. Workaround: Press Left-Alt to reset the cursor location.
In WebGL, pressing Tab does nothing. Workaround: Don't press Tab.
In WebGL, some keys are not registered in Windowed Mode. Workaround: Use Fullscreen Mode.
TRAILER
https://www.youtube.com/watch?v=xN2kKu5hdAE
SCREENSHOTS


| Original URL | https://ldjam.com/events/ludum-dare/38/up-8 |
Ratings
| Overall | 164th | 3.759⭐ | 60🧑⚖️ |
| Fun | 299th | 3.316⭐ | 59🧑⚖️ |
| Innovation | 138th | 3.683⭐ | 62🧑⚖️ |
| Theme | 585th | 2.964⭐ | 58🧑⚖️ |
| Graphics | 360th | 3.6⭐ | 62🧑⚖️ |
| Humor | 283th | 2.893⭐ | 58🧑⚖️ |
| Mood | 243th | 3.5⭐ | 58🧑⚖️ |
| Given | 97🗳️ | 115🗨️ |
Edit:
Just had a look at the source, and with only seven levels, they do not require anything other than the loops and loc, but great work in the 72 hours! That's a great start toward needing those other commands! I even may go back and try to write the programs to use other commands anyway.
Edit:
Whoops, double post.
Sorry turned into a bit of a rant but wanted to get that thought down. Overall, great entry for 3 days!
Wisdom for the ages :smile:
Is 'RUN' covered in the manual?
Finding out how to make the code, er... run took me longer than the first two levels combined. (But that may just be because I'm very tired right now.)
On the plus side, it's awesome to have an actual Zachlike in the jam, including the requisite 20pg. manual!
I think the graphics are awesome as well, please don't be so defensive about it!
(Not everyone likes the same styles.)
On the negative side, it becomes pretty clear why Zach-games themself chooses to simplify or gloss over certain aspects of coding or harware.
There is a lot of tedium involved if you stick that close to the actual inspiration...
At least you can copy the ASM! :grin:
Some sound would help as well, with the mood you've got going you wouldn't even need music.
Maybe the keypresses of one of those old IBM-keyboards?
One last thing:
Re: The FarmVille comment in the manual:
C'mon, snark is ok, but just, well, no need to look down on different gaming experiences and tastes y'know?
Besides, not everything that looks cute has to be easy; have you heard of, say, ['Jelly no Puzzle'](http://qrostar.skr.jp/index.cgi?page=jelly&lang=en)?
I mean: I prefer Zachlikes like this and hard puzzlers above a lot of things :nerd:,
... but you don't have to put others down to be great yourself :sunglasses:
@remco Yeah, we didn't get much of a chance to look over the manual before publishing, so it's a little disorganized (and we're realizing it's a bit hard to find the actual useful bits in all the flavor text...). The "run" command is in the manual though, on page 18. As far as the "Common Concerns" section goes, everything there is intended to be a joke... we didn't mean to come off as defensive or (especially) as putting anyone down. The manual was supposed to come off as being written "in character" I guess and doesn't express our actual sentiments. I can see how it could be interpreted as offensive, though. Sorry about that! We'll take another pass at it and try to remove anything that might be offensive...
The post-jam version will probably have sound, if we have time. For now you can just pretend the clicking of your keyboard is the in game sound, I guess :grin:.
Thanks for pointing it out though, I'm glad you took the time to tell us... It gave us a chance to change it to something better that was more in line with what we intended.
A few points where the game could be improved:
- While the CRT effect is of course very nice one should have the option to disable it as it might be distracting while starring at the code...
- The manual contains some errors: Page 12 `(%bx)` instead of `[%bx]` and page 18 `menu =` instead of `menu -`.
- The manual is humorous but it's a bit annoying that you have to read the whole thing before you can play the game.
- A cheat sheet in the manual (or the game) would be helpful so I don't have to scroll around the manual all the time.
- If you press ESC it deletes all the code which is not a nice thing to do.
- The code should be kept between levels.
- Why the difference between a wall and a rock?
- The fact that the scanner also picks up the portal is kinda annoying as you have to handle this case separately and you can't just check whether the returned distance is 1 and then turn.
- The assembly syntax is kinda weird: for the order of operands and the memory access (i.e. [%ax + $1] you chose Intel syntax but all the prefixes (i.e. % and $) are from GAS (or AT&T, however you want to call it). This is really confusing. Or was it like this for the original 8086?
- Why would there be instructions to turn around the rover in a multipurpose micro controller? Also why would there be constants for the wall type and such? This is really specific for this use case. If you want to do it realistically you should have used memory mapped I/O and just specified all the constants in the manual. This way you also wouldn't need to declare an array just to do a scan and could just read it from the memory (e.g. `sca [$array]; cmp $T_WALL,[$array+1]` is just something like `cmp $7,[$42]` where `$7` is the constant for a wall and at position 42 the scanned type is mapped.
- If you write `jmp` without a label this happily compiles but gives a runtime error. This could easily be checked during compilation.
@smbe19 I'm a little worried about the ESC bug you mentioned. It was single-handedly the most annoying problem with the game during development. I spent a bunch during the Jam fixing it can cannot seem to recreate it now. Would you mind explaining more specifically the situation leading up to the bug? I.E. what platform, level, run state. I'd love to fix the bug for the post-jam version.
I'll get a chance later today to look through the rest of the feedback more thoroughly. Thanks again for all the feedback!
I'm on Win10. Good luck with finding the bug ;)
Good:
- Quite impressive concept and execution!
- Great potential to become an educational game for teaching assembler
- CRT Effect is awesome
Improvable:
- Documentation could just be a short set of examples and it would be much easier to digest.
- Levels could be more complex in order to force you to explore more complex programs (As of right now the game is beatable with basic loops)
- Having to rewrite your code everytime is a bit tedious. One improvement could be to bring the existing code to the next level?
All in all, the game is great! Keep up the hard work!
*UPDATE: BTW, the arrow keys worked in command mode to bring up previous commands*
@geeisgeeitsomelaldy Yeah, I wish I could've gotten the controls working in WebGL. For whatever reason, Unity doesn't capture the "Alt" key consistently. On Chrome it caused the window to defocus and on firefox it caused the browser menu to open. This led to a really bad experiance. If anyone knows how to solve that problem, I'd love some help with it. In the post-jam version I'm going to fix this by using a different button for switching to the terminal (maybe control-T or something).
@smbe19 Thanks for the detailed feedback! I'm still trying to fix that bug (I think I might have the cause narrowed down, so hopefully I figure it out soon). I think you're right about the CRT effect, I'll add the option to the list of things to change on the post-jam version. We're still trying to figure out what we want to do with the manual for the post-jam version, but I agree that it can be hard to find what's necessary. Thanks for pointing out the factual errors in it, we'll fix those in the post-jam version. The manual talks about rocks because in the original design there were going to be rocks that could be moved around in some puzzles, but they never made it in the game. The scanner picking up the portal is actually intentional. You can use the second location in the array to check the type of the object. You are probably right about the memory-mapping approach for thematic reasons, but we wanted the rover controls to be more easily understood. We might change that in the post-jam version.
@james-dunlap We originally intended to make that a bit more scalable, but it never made it into the game. It's the first thing I changed in the post-jam branch (which is in the same repository as the main game).
@multiplexor Thanks for the suggestions! Hopefully we can make most of those improvements in the post Jam version!
@Scritorum Sorry about that! I'll see if I can't figure out what's wrong!
I love this kind of game! *(like TIS-100, Shenzhen I/O...)*
Even if everything is possible with simple loop (I found `%cx` and `loop` way too simple) I had fun making more complex solutions with `sca` for example :smile:
Also, maybe better explanation with a little example can be useful to start!
Good job!
Because of this, I feel that rating your game in anything other than graphics (I do quite like the visuals) would be unfair - I am simply not the target audience.
Props for the concept, shame it's not a cup of tea I know how to drink.
Left alt to switch the terminal window was kind of annoying because I need that key for the square brackets with a German Mac keyboard. But somehow that added to the realism.
It would be nice to be able to go back to a level you solved before to copy some code. But yes, learning by repetition.
I can now add knowledge of up-8 assembly to my resume. Thanks guys!
I feel like I'm doing Ludum Dare all over again as I play...
But near the start I had no idea what I was doing, even after reading the manual. Like no idea if the registers were getting set or anything, no idea what scn was returning or anything.
Being able to see what's in the register or like print out what's in a memory address to the bar at the bottom would have helped a lot just to understand what was going on, maybe showing the line that was getting executed as well. I set up a few arrays to hold distance to move and direction, then looping through and using jne and inc to check if I had reached the distance but the program kept going past the number I entered in the array. it was very strange to me
I also like the idea of showing the line that's being executed. It was originally my intention to do that, but there were some technical limitations with the Unity GUI that made it sort of difficult.
By the way @spaceman can I ask you a question about my game (the one that opened in a really small window) can you run it again and hit the maximize window button (if it is available), if it doesn't maximize please let me know and tell me what Windows you are using, this is a major bug and I need to fix it, thanks in advance !!!
The graphics are great and as far as I played it seemed to be well polished.
It's pretty impressive you've been able to build this game in such a small time frame as well.
One suggestion though, when I started reading the manual it would be nice to have an example complete program that I can use as reference without going through all the commands. I think that would make it easier to dive into the game straight away.
Proof: 
Some comments:
As others have said, you provided far more instructions than were necessary. I generally won by allowing my robot to smash into walls continuously moving say Up and Right every turn until we got to the goal. The last two levels required (or at least it made more sense) to make use of scanning. This made the majority of the manual unnecessary. Perhaps you should add some hazards into the level requiring that you not run into the walls? or dare I say dynamic obstacles that require you to legit navigate through logic rather than brute force. I
also understand not wanting to make the game even harder for the non-programmer however.
The biggest issue for me was that end and home keys did not work as I expected them to (end moved the cursor to the end of the document which required that I use the arrow keys to navigate). Additionally, some form of sfx would have greatly added to the game.
Overall I enjoyed your game as a career programmer. Thanks for the game :)
Could really use a debugger or something, though, because when something goes wrong, it's very difficult to tell what it was. Particularly with the SCA command, I thought.
Hopefully you can sort out the post-processing so that you don't have to run the game in fullscreen mode.
Everyone on the team is in the midst of finals right now, so we haven't had a lot of time to read over all of it, but we're catching up... slowly. I'm also trying to try all of your games during my breaks from studying!
Phenomenal work, I think? (Kudos for the Albert Camus shout-out!)
I've played Shenzen before, it feels similar.
As a comp. sci. who once made an C->ARM compiler and then an interpreter (for a small subset of ARM assembly), I appreciate your effort very much.
At first I had no idea how to move, but in the end, I just needed to "Read the manual"!
Can't write anything else because I have 11 pages more to read :)
Well done, guys. Well done!

Finally an assembly simulator game I actually was interested in playing!
First thought was "oh man, how is this game gonna do in a jam?". I usually go for simple and understandable games to keep the audience interested. But you managed to achieve that anyway. You made it simple enough and it was so rewarding when you actually got the hang of it. To make someone invest so much effort into reading a manual, there's a high stake that they will be pissed off if they don't find the game rewarding. But that guy is not me. I loved this!
Really well executed!
If you're gonna develop this further I'd LOVE to see subroutines in this one!
I think i spent about an hour on this game, honestly. I'm a programmer by heart and will not accept shitty algorithms, so i actually spent most of my time on lvl 2 to come up with one, and i did. It checks for walls and acts accordingly. I hate hard coding and this game allowed me to not do so.
I'm totally gonna check out the source code on this! Love the CRT effect and I'd love to learn how to do it. Also, I'm really interested in how you managed to create a virtual memory. Oh man, I'm looking forward to diving into the code!!!
Also, i wanna thank @thor for leaving some feedback on my game [Infecteria](https://ldjam.com/events/ludum-dare/38/infecteria). We're gonna develop the game further during the summer and all those minor gripes will be gone!
Thanks for this awesome experience and hope to see you guys in the next jam!
// Rasmus (one half of [LiquidBrain](https://ldjam.com/users/liquidbrain/))
https://www.youtube.com/watch?v=IwLATN0OA3Y