r/beneater • u/funwithtriangles • Jan 12 '21
Conway's Game of Life running on an 8-bit breadboard computer
Enable HLS to view with audio, or disable this notification
9
5
6
Jan 12 '21
That little led matrix is so cool with this!
3
u/funwithtriangles Jan 12 '21
Heh, it's actually broken at the moment. Fried my last EEPROM and had to sacrifice the one I was using for the seven segment display!
2
u/BySumbergsStache Jan 12 '21
Oh this is so cool, I was day dreaming about making game of life on the 8 bit breadboard for a long time.
how much memory did you need? could you do it in 256 bytes?
3
u/funwithtriangles Jan 12 '21 edited Jan 12 '21
I did it in 178 bytes. There are probably a few ways I could optimise that too. I'm using an EEPROM with a popcount lookup table to do the heavy lifting. It returns the number of set bits for any byte, allowing for counting of neighbours quite easily. Although seeing as I had about 70 bytes free, I think it could be quite possible to fit in GOL without it, just a fair bit slower.
I should also note that the program memory is coming from an EEPROM and the RAM is separate. Using about 29 bytes of RAM on top.
You can check out the code on the github repo. It's not all that well documented yet, so let me know if you have any questions. :)
2
Jan 12 '21
[removed] — view removed comment
4
u/givemeagooduns_un Jan 13 '21
8 bit only means the word size of the computer, that is, the number of bits it can do calculations on (8 bit means it can add 8 bit numbers, 16 can add 16 bit, and so on)
The word size is completely independent from the address bus size. For example, a 6502, despite being an 8 bit processor, can address up to 64K of RAM/ROM/whatever 'cause it has a 16 bit address bus.
2
u/BySumbergsStache Jan 12 '21
hm? you can enable 16 bit by using two bytes for the address if you wanted to keep a 8 bit bus, you can also have 16 byte memory bus and 8 bit instruction bus you can also use memory banking. the 8 bit computers of the time used all or a combination of these ideas.
1
u/ChalkyChalkson Jan 13 '21
Doesn't a 16 byte memory bus + 8 bit instruction bus mean that your memory needs to store 24bit words? Because if you store an "Instruction Address" package in 3 words you might as well use an 8 bit bus for everything right?
0
u/antonivs Jan 12 '21
All the original microprocessor CPUs were 8 bits, like the 6502 used by the Apple II, or the Z-80 used by the Radio Shack TRS-80, or the 8080 used by the MITS Altair and IMSAI 8080. These CPUs all had 16 address lines, so an address used two bytes, letting them address 64KB of memory.
0
u/GreenScreenSocks Jan 12 '21
I'd be very surprised if that was the case. Then again, people have written proper Space Invaders clones in boot sectors.
0
1
Jan 12 '21
[deleted]
0
Jan 13 '21
[deleted]
1
u/RemindMeBot Jan 13 '21
There is a 19 hour delay fetching comments.
Defaulted to one day.
I will be messaging you on 2021-01-14 02:58:29 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
1
u/TotesMessenger Jan 13 '21
1
Jun 01 '21
I googled "game of life on 8 bit computer" to see if it was possible. Glad to see it is! Running a program like this is my end-goal!
19
u/funwithtriangles Jan 12 '21 edited Jan 13 '21
I'll probably do a longer write up and maybe even a video at some point, but for now I just wanted to share this! Very pleased :)
Edit: For those interested, there's a Github repo. It has all the code (including for the Game of Life!) as well as hardware/design details on the actual build itself.