TIS-100 - The Assembly Language Puzzle Game That Nobody Asked For
HTML-код
- Опубликовано: 7 июн 2015
- Zachtronics is back with an early access programming puzzler which is supposed to bring all the fun of coding assembly language to a puzzle game. I'd expect nothing less from the creator Infinifactory and Spacechem.
Игры
Just what I need...a programming "game" to relax after a hard day of programming...
@merinsan But it's indeed somehow relaxing, because here you have quite isolated problem description. In real world programming you have to deal with much higher level of complexity.
@@orange-vlcybpd2 Agreed:) I just started playing through all the Zachtronics games, and I play them after a full day of programming. They are indeed relaxing :)
EXACLYYY
@@orange-vlcybpd2while I’m not a programmer, I think there’s something nice about doing something you like without any of the downsides. I can put the game down for a month and there are no consequences. I can struggle on a level with no consequences. You should be doing something you enjoy for work, and the same thing without the stress should be more enjoyable.
It always amazes me that the original Roller Coaster Tycoon was coded in Assembly.
is that a joke? lol...
i just found out its not a joke but why would you code a game like that in assembly?
Kiefer Aland you can optimize the hell out of it. The game is super old, yet look at all the things the game keeps track of. Thousands of people and rides etc. Because of this, you can run the game on a potato without issues. Additionally, it'll run without a complaint on basically any type of system because it's in such a low level language. Idk if chris sawyer had any of those ideas in mind, but those are just a few benefits.
People should program their games in assembly nowadays. Imagine programming GTA V in assembly.
Having been an assembly language programmer for decades, I'm not amazed.. Once you learn the instructions, it's not a big deal,
Big tip for anyone playing this....
Print the manual for maximum nostalgia value and ease of use. It comes out of the printer messy looking and its awesome. And you definitely want to play full screen. Printing the manual is definitely what the developer had in mind when making this game which is AWESOME.
Zachtronics is by far the studio with games I love the most that none of my friends play (I think some friends hate me after explaining them how awesome Spacechem and Infinifactory are). Oh, and KSP. None of my friends play KSP either (sadly)
Assembly is beautiful. At its simplest, it is just human representations of instructions and data stored in binary. There is no abstraction (except assembler strucs and macros), you literally control the hardware, the registers, the memory, the stack, the interrupt vector table, memory segments, paging. You get to see the fundamentals of a computer.
David n And then you get to rip your own hair out because things are going wrong and you have no clues as to why.
TOASTEngineer Isn't that just a summary of our technological life?
frealms
Not really. I'm a Python programmer. Everyone's like "oh my god my code is segfaulting" and I just rub my balls on the keyboard and everything works.
TOASTEngineer Now to find out if you are a poser: Do you rub them left to right or right to left?
frealms Left to right until I encounter U+202E, then right to left until I encounter U+202D. I'm like a testicular Turing machine.
Zach Barth, you insist upon consuming all of my brain's clock cycles thinking about the most random shit.. Love it.
I'm an avid gamer and to this day TIS-100 is one of my most favorite - if not *the* favorite - game of all time.
The 14-page TIS-10 manual fits in nicely on my desk.
When I took an assembly language class at Purdue in the mid '60's, the instructor had a program which simulated a fictitious computer with maybe less than a dozen instructions (READ, WRITE, ADD, SUB, TEST, BRANCH, HALT). No parallelism. This was to introduce the concepts of a program before moving on to real hardware.
I just took Assembly at my University last year. I think we used the IBM 360 version. Seemed really complex in the beginning, but got easier as we went along. Thanks for showing this game =D
Yay IBM. I coded 360 for 46 years and (never mind the assembly) the machine instructions simply make sense the way they are designed. I hate Intel/8080 and luckily have NEVER had to code in it.
Perhaps I'm in the minority, but I've always quite enjoyed ASM. Granted, I've been fortunate enough to write mostly MIPS and ARM assembly, and none of that pesky X86 stuff. But I always enjoyed the optimization aspect of it and I think that's why I like this game.
Sometimes a let's-player is not good at a game. This is not one of those times.
Thanks for making a video on this and getting such a niche game some exposure! I am for sure checking it out now.
And suddenly learning a bit of x86 assembly was all worth it. This game looks awesome. Definitely gonna get it.
Please more of this game watching you get frustrated is the fun part
That nobody asked for? Well i might not have asked specifically for assembly games, but more Zach stuff is always high on my list of wants and needs
This seems really interesting actually. Thanks for the video, Scott!
...I don't know whether to thank you or curse you for exposing me to this wonderful timesink.
Looks neat. Last assembly I did anything significant in was in IBM 370, and that was a quarter-century+ ago. But you've convinced me to try this!
I came back to this video, after playing the game for a while.
You jumped past the Sequence Counter just like me! xD
This... Is... EXACTLY WHAT I NEED ! Thanks for sharing this game
This is just what I needed to get started with the game!
Recently got into programming x64 assembly, will have to give this a play.
As an olde tyme assembly and microcode programmer (yes, from back when fish hadn't yet considered trudging out onto land), this looks like a lot of fun.
Whenever a friend of mine (who is addicted to this game) mentions it to me I always think:
"Assembly language programming is an extravagant waste of human talent and should be avoided whenever possible."
(which is actually a quote by Peter Norton).
Actually, it shouldn't. Even when you intend on writing your "actual" code in C/C++, I think it's always a good idea to make yourself familiar with whatever hardware you are using by experimenting in Asm first (especially if it's a low-end microprocessor, which may not work the way you are used to from your PC running on x86 hardware. Ex: The ATTiny85 can only shift one bit per cycle, it cannot multiply or divide integers, has no FPU, and takes two cycles to compare a value to another one, regardless of whether the second value is 0 or not, can only perform a "branch if lower" or "branch of equal of higher" instruction, but cannot actually check if a value if "equal or lower" or "greater, but not equal" in a single cycle, etc. This vastly changes how optimized code is written vs. how it would be written for a PC for example.).
Lovely game. Bought it on a prior sale. Haven't played yet, but you are talking me into it.
I like this game. It’s really difficult and frustrating at times, though
I briefly put this on my wishlist. Then I actually watched the video and took it right off. All this went over my head. x.=.x
In your Signal Amplifies solution you could change
MOV UP, DOWN
MOV LEFT, DOWN
to
MOV ANY, DOWN
to save 1 instruction. You can't get it more parallelized than 2 operations (numbers) at once. This is because you then need for e.g. 3 operations more than 3 times the instructions so your cyclecount increases. Even if you split it into 4 operations you would need more than 4x the instructions so you don't operate 4 times faster or double as fast as with 2 OPs at once because of your increased cycles ;)
As an assembly language programmer just watching this video got me excited. Looks very fun. Interesting instruction set but assembly language users have to get used to swapping instruction sets a lot anyway.
YES! Oh man i was just wondering if you are going to do a video on it! Wohooo, today was a good day! :D
I -have- hate assembly from the bottom of my heart. I remember first reading about it in a gigantic book I had that teaches you how to do all sorts of things in DOS 5.0. Once it started involving Assembly, I got pissed off and turned the book into a doorstop.
Headrock hate?
Shitstain 5000
**Facepalm** Yes.
ah
Headrock Assembly is fun!
TheLeftLibertarianAtheist
Great fun. Like an enema.
That's a pretty cool game idea! I've been learning / doing some assembly programming on the Commodore 64 for a while now (Interested in how those cool demo effects are made) so I'll definitely try this as well.
Thanks for letting us know Scott, I now know what I'm going to play for some time :)
I just love the way Scott says "You see?" after he does something here.
you are bringing back nightmares from the high school!
Scott Manley There was an amazing old game on Apple II / C64 called Chipwits. It was a puzzle game where you had control of a robot on a grid that you could give instructions to turn, grab items even play musical notes. It used a drop in graphical interface for programming your robot.The intent of the developers was to have you evaluate the problem and do as few instructions as possible to get the goal. 8 year old me cheated and figured out enough conditional logic to make it do a keyboard interface to do the challenges as user input instead of meticulous planning. It might be fodder for a let's play or two down the road if you can find an emulated / fan made game.
So it's SpaceChem but with programming. Love it. I've only played the demo of SpaceChem but I was still impressed.
Wait... I was going to comment something productive and good to society, but then I saw the only comment was from scott.
...what was I gonna say?
It doesn't matter. FIRST.
I'd love to see how you tackle the multiplication problem, if you feel like publishing more gameplay!
solved by carefully timing the cycles
then I saw your video
...ahhhwhwhs, adding them together seems so clever now
I actually find this very interesting. i love games like this. But i can see why most probably wouldn't agree with me. There was an old hacker indie game a while back which although wasn't 100% realistic is was realistic enough to be very boring to some people but interesting to me and i got a kick out of playing it. I would very much enjoy this too just for fun of figuring it all out, and doesn't look that hard at all. But i doubt this is a 100% accurate representation of how actual computer instructions work.
Was it Uplink?
This looks really really interesting. What a great idea.
love these guys
Very cool. Of course no one has discussed the best assembler, IBM's z/Architecture assembler. :P
Just kidding - I've done assembler on 8080/Z80 (including Z80 simulation macros in the DR MASM), 6800, Prime, Honeywell Series 6000...and some of those funky x86 stuff, too.)
I have no time for games, but I may have to make time for this one.
Excellent video, Scott!
This might have appealed to me 40-years ago, when my brain was 40-years younger and I was actively programming. Nowadays I don't much time for even mindless games, let alone though provoking ones.
On the other hand, it's interesting to see such an early Scott Manley video.
Nice game, will be certainly added to my wishlist on steam
This reminds me why I stopped learning any code whatsoever...
***** What? You can code in a higher level...
P3dotme No no, just code in general.
"A to B to C to do D...What was A again? In fact what did this entire block of code do in the first place?!"
***** I did that, I spent more time writing comment lines then code :(
At least if I coded something it would be well documented...
***** Your blocks of code should be named, possibly typed, and documented in such a way that their intended use is obvious. Of course you don't know what "A" was, but a less abstract name might be able to remind you. Proper names can mean the difference between an unreadable mess and a simple solution.
***** It sounds like you might not have been breaking your code blocks up to be as simplistic as possible.
Another good skill to have, aside from good commenting and breaking up code blocks as much as possible, is learning to name variables with *extremely* obvious names. Even if it takes longer to type. Most IDEs have auto-complete, and the extra kilobyte or two extra it might take up is going to be largely irrelevant by modern standards.
If you still have any interest in coding but are nervous about jumping back in head first, I would *highly* recommend checking out Clean Code by Robert C. Martin. It's a great book that helps you think about good coding practices and concepts, and less on the actual coding itself. I'm working my way through The C Programming Language (2nd Edition) by Kernighan/Ritchie right now, and it also seems to break things down easily enough to get a good basis of "how" coding should be performed, rather then just *what* to code to get it to run. It might be a little bit more intensive, but if you've got a few bucks to spare buying a used copy might be worth the investment if you want to give programming another try.
Often times the design and layout of a program can be as, if not more time-intensive then actually writing the code itself. If you have problems keeping track of what something does, or why something else needs to do something different, then it is an indicator that you need to think and plan out your program in greater detail. It's boring, but it's true. There will always be areas of a program that you didn't account for, but for the most part, you should generally have a good idea of where you are and where you're trying to go.
Solid planning can help fight a lot of the problems that you mentioned. Don't lose hope! :)
Finally something i can understand!
All the fun of coding assembly language ?
You haven't done that past 8086, right ? And even that chip was a mess compared to a superior 680xx. :-)
MaxiTB I learned on z80 (which is practically x86) then spent most of my time coding 68000. It came in extremely useful when I began reverse engineering DRM systems and writing buffer overflows.
Scott Manley Ha, yeah, then you know the pain switching back to a x86 architecture - I missed those 32bit registers and plenty of addressing operations so much :)
Personally I started out with the 6510, I'm mostly a Commodore kiddy ;)
MaxiTB Well when I returned to x86 the registers were 32 bit. But I did miss having lots of them to work with.
MaxiTB Even the 6809 was better than the 8086.
Yes. I know. I'm admitting I used to write assembly code on a Tandy CoCo. Must you judge? :)
Cuzican Aerospace Yes, because internetz :p
This looks amazing.
I love this game, even though I'm not good at it
I think the fact that I just finished an engineering degree shows - before I realised, I was completely fascinated by this.
I'm so happy programming is becoming so popular.
C++ Let's Play?
AnimationCrafted In what? Visual Studio?
AnimationCrafted There is something that kinda does just that, it's called Handmade Hero, where a guy is making a game in C++ from nothing, no pre-made engine, and he isn't even using an IDE, unless you consider EMACS an IDE.
Something smells off Thumbs up to that guy, that's the way it should be
Something smells off AnimationCrafted As long as you have system libraries, you're fine. Although, implementing graphics in C++ without DirectX or any engine would be near suicidal.
Something smells off Real programmers use butterflies. Check your XKCD.
Looks pretty good. I'm gonna try it when I get back from Skellige...
I used assembly language for some years and I think that there is more CPU without SUB than without ADD.
To execute a substraction, you add the negated number, invert all the bits and add +1 (often it's an increment INC function).
Anyway, when sometimes some CPU let even MULT, you're in heaven.
DIV is an utopia..
R4P70R Most processors I've worked with had has ADD. Some DIV.
I think ADD is the bare minimum of arithmetic a CPU has to support to be able to do anything useful
11:30 a really simple thing you can do here to spread out the work more evenly is to do MOV UP, ACC; ADD LEFT; MOV ACC, RIGHT in the second-from-left node on the second row, and eliminate one of the ADD LEFTs in the third-from-left node. You're shortening up your longest loop (which is usually going to be a throughput bottleneck) and also reducing the amount of data moving (every port read/write takes an extra cycle on each node for handshaking). That lowers the cycle count from 278 to 202, which is close to optimal :)
The way you do multiplication in computers in NOT "Add A to buffer N times"... It would be insanely slow, and it would depend on the actual values strongly... Multiplication in binary is done in a different way, using binary shifts, and it is awesome... Hint: Shifting binary numbers left one bit is equivalent to multiplying by 2... Research...
Илья Найдов I'm pretty sure Scott knows that. Problem (or challenge) is that the TIS-100 does not use binary and has no shift operation.
Ole Hansen if you add something to itself that is multiplying by 2, add the result of that with itself you have multiplied by 4, Essentially you would use binary exponentiation using multiplication
then you just need a divide by 2 and a is odd/even test
ratchetfreak Might work in TIS-100... It would probably require a lot of code on multiple blocks...
which is kinda the point of TIS, no?
Илья Найдов MULU is all well and good, but have you seen DIVU? It's crazy!
Hmm.
Hmm!
I know some of these words!
Thanks for teaching me that I don't know the first thing about coding.
Started playing this again, still quite a few things I don't understand and discovering new tricks
5:33 Hey, look, Elite Dangerous!
this game looks awesome having already learned mips in computer architecture cource
Brings me back to the early 80s when we, engineers, would challenge each other to do a task in the least amount of bytes. We were using machine code not asm to do it.
Any chance of a longer Let's Play video/series of this, Scott? I have only the faintest idea what's going on, but the concept is fascinating.
Hey Mr Manley. I alwwys enjoy ur content and especually when u played papers please. Maybe you should try playing "plague inc" i think its would be fun. Keep up the great work.
the ending scared me my god
I definitely could have used this when i was working in assembly programming on Commodore 64 somewhere arround 1990...
I had a private service for computer repair and then Commodore 64 was allmost top of class(except Amiga was there on top)
The command nodes in this game look remarkably like an FPGA
Didn't see anybody mention this but there is a similar computer/chip. Made by a company called Greenarrays. Newer versions contain 144 compute nodes with 64 18-bit words, two stacks, and two registers. Programmed using a FORTH variant. Some nice features like executing code from io-ports, each word is 4 instructions.
Jesse Simonsson yeah, just found out about that one yesterday, seems pretty amazing!
Finnaly! a programming logic gate video game!
Have you seen Ascent - The Space Game? Like Eve but more colony building, building domes, rectors, exploration, hiring colonists, EVA, taking soil samples, finding resources, hiring NPC pilots to trade betwen colonies (etc)
this video was motivation for me to buy the game :)
I don't know if i'm tired or something but my brain had seriously hard time convincing itself that this wasn't kerbal space program
i loved the old inline assembler in turbo pascal ever since i accomplished to write a formely very slow interpolation routine in that and it was sooooo much faster, i could not believe it. and that was probably badly coded assembler. doing that makes you realise how terribly inefficient compilers must be (well at least that turbo pascal compiler) to make such a big difference.
That is breaking my head, but it's interesting though. * oh it hurts so much* :D
so... who remembers At-Robots from the 90s, coding little triangular tanks to battles each other on a 1 square km map using an assembly like language?
opo 15, 1.
I'm looking at these story nodes and I'm wondering that maybe there's something more to them, especially the ones that still have input connections to the rest of the board. Unfortunately I don't think regular nodes can directly push their ACC values into other nodes. Would be interesting if you could obtain even more story by passing them specific values during the level.
TheRealPentigan MOV ACC,
I usually prefer really high level languages. Heck, my favourite language is Haskell, but I also like assembly.
Maybe I'm weird, but I will definitely get this - looks awesome.
Yndostrui Why would one prefer really high level languages? I understand why most people wouldn't prefer assembler, but anything higher than C++ is annoying.
indjev99 Why would one not prefer high level languages?
C++ is rather high already, actually. It adds objects and abstract objects. It also has garbage collection, although you need to enable it manually.
Haskell takes it a bit further still, you can pass functions around, partially apply functions, map functions over lists, etc. It makes for very concise programs.
Take this function that calculates the factorial, for example:
fac n = product [1..n]
It is concise and it makes clear what the function actually does.
Compare this to a similar C++ function. Even a skilled programmer will have to look at the code for a moment to understand what it does, if they don't expect a factorial function already.
Yndostrui Yes, C++ is still a high level language. But when I'm reading a factorial function in C++ I know exactly how everything works. When you're reading this: product [1..n], do you know exactly what sequence of operations is preformed to get the result?
And BTW if you name your functions properly everyone would expect a factorial function when he is reading one.
indjev99 For individual functions, the name will do, yes. But if you have a complex function and need to understand it (maybe it has a bug), this can cause quite some issues.
I can actually figure out what the computer really does with that line(with debug options), but do I need to?
There is no reason for me to understand every bit that gets set, it is way more effective to look at a program on a high level rather than shifting bits around...
The whole point of higher-level languages (including C and C++) is to stop doing that and get an easier way of looking at things.
And do you know which registers the processor is going to occupy, which memory regions it will temporarily seize, the exact instructions it executes?
You can figure it out if you really wanted to, but there is no need.
The only reason why you'd ever want to know what it does exactly is when doing micro-optimisations, that's why these tools exist, but it is rather uncommon use case.
Yndostrui Try Brainf-ck. Only eight(!) instructions.
LOL, luckily I still get to occasionally code ASM, just not as often as I would like.
I want this to be a mini game in Star Citizen
+LockAC04 Holy shit yes xD
Back before manic episodes and other sad things, my father was fabled to have been able to program in the assembly and even machine code. He was a bit famous at the time, 80s I think. Charles Brannon. You may have heard and then forgot the name.
4:16 Your mention of some early computers not having ADD reminded me of this: en.wikipedia.org/wiki/One_instruction_set_computer
Obviously a game aimed at electronics engineer and old school gods of programming.
Way above the abilities and knowledge of an IT engineer.....
If electronics engineers want a laugh they ask an IT engineer to attempt to explain how they believe a Intel quad core processor works.....
My first computer, in 1977, only programmed in Signetics 2650 assembler.
To me assembly language on ant processor is second nature.
Scott, long time since you made this video but is that right about computer didn't have ADD? I think it's that they didn't have SUB, because you'd use 2's Compliment on one number in binary and add it to the other to get the subtracted value.
That's easy for you to say, harder for you to build the hardware that does it.
en.wikipedia.org/wiki/Manchester_Small-Scale_Experimental_Machine#Programming
That's awesome man! With the limited instruction set (and memory) it made more sense to load a negative X and sub Y than load X and add a negative Y due to the fact they'd need somewhere else to store negative Y before the addition. Thanks for putting me on the right train of thought :)
Aethenthebored you subtract numbers in binary by inverting the number (0s become 1s, etc.) and applying 2s compliment. When you add them together it gives you the subtraction.
Oh my..brings me back to the 90's when i started to code Virii. The power of ASM.
Scott..you should try corewars (A.R.E.S is a easy to use simulator)
Sizzlik I used to do that, with pmars, wrote some semi interesting things but never was particularly amazing.
Finishing this game should be mandatory homework in computer science class for kids!
I want this game so bad but I feel like I'm too dumb to be able to enjoy it. :(
Humle Monthly. o:
It's on STEAM for $6.99.
It's so frustrating , and amazing
he needs to make Tutorials for this game from start to finish.
And here I am, learning AVR Assembler on ATMega16 for university.
The protagonist in this game makes me think of Terry A. Davis
Scott if you could just clear up this one thing that's bugging my mind.
Let's give you a condition that does exist in that scenario:
Three consecutive 1's pumped into a single input.
(Let's say our first 1 is currently in the ACC)
The first line (within the start function) tests if the ACC number is not zero, which is true in this case, so it executes the SET function which is defined below to pump the next number into the ACC (which is our second 1 of this scenario), and notice how Scott removed the: JMP START where this function is defined, so the code does not reset, and we move on to the next line.
The next line pumps the next number into the ACC (which is the third 1 of this scenario), and we move on to the next line.
The next line tests if the ACC number is 0, and it isn't, so nothing happens on this line and we move on to the next line.
The next line pushes the input number down below into the next box, and this should only happen if the previous number in the ACC was a 0.
The next line resets this whole process.
That's what I don't get: by this codes logic, three consecutive 1's pumped into a single input should activate that condition, and cause Scott's code to fail that scenario, but we see in the video that his code ends up working perfectly. How?!?!?!?
BurrowMonster Scottish computer wizardry
BurrowMonster It never pushes the input number into the next box, it pushes the number 0 into the next block. To push the ACC into the next block it would have to be MOV ACC, DOWN.
So (I assume a 1 before first input, so we start at the top):
1 IN ACC
ACC is not zero, jump to SET
MOVE IN to ACC (Second 1)
MOVE 0 DOWN (Signal no change)
(wrap around to start)
ACC is not zero, jump to SET
MOVE IN TO ACC (Third 1)
MOVE 0 DOWN (Signal no change)
(wrap around to start)
ACC is not zero, jump to SET
MOVE IN TO ACC (out of scope, but say it is a zero)
MOVE 0 DOWN (Signal no change)
(wrap around to start)
ACC is zero, do not jump
MOVE IN TO ACC (out of scope, say another zero)
ACC is zero, jump to ZERO
MOVE 0 DOWN (Signal no change)
(wrap around to start)
ACC is still zero, do not jump
MOV IN TO ACC (A 1!)
ACC is zero, do not jump
MOV 1 DOWN (Signal change!)
jump to START
IN OUT during this example (just the top-left node):
1 - (Depends on if there is a 0 or 1 before the example starts)
1 0
1 0
0 0
0 0
1 1
Yugge If you buy push input number meant the actual number of the input port (1,2,3,4), then yes, this is done, but only if there is a sequency of 0 followed by a 1 :) That is the MOV 1 DOWN command
BurrowMonster "SET:" is not a definition of a function, it's a label. What you called an execution of SET is actually just a jump to the line after "SET:". The key difference is that when MOV UP, ACC is executed, the program doesn't go back to where the jump to "SET:" occured, it just goes on to the next line.
OMG, i didn't understand two thirds of what he was saying... though i can't help to be attracted to the topic (as well as the game), though i'm a complete ignorant of its contents! Nice video!
God dammit Zachtronics, let me finish Infinifactory first!
This would have been amazing to understand a bit of programing for older micro controllers. The 8051 comes to mind that they still teach about.
*****The Input handler is using gray code. Its a input code that never changes more then one bit at a time.
I am just saying as someone that has done projects with both the ASM current micro and current gen of python based and C+ based micros. I could be half asleep and write code for that latter 2 and have to be fully awake to work on ASM. Its just not my thing.
Imma go learn with this :O
Holy crap that thing looks fun. I take it the name is a play on the TRS-80?
I think you meant that early computers only had ADD and not subtract.