Nand2Tetris/Hack Core
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Nand2Tetris/Hack Core
Hello, I have an unofficial core not many people know about, implementing the computer from the Nand2Tetris Coursera course, which is called Hack. It was largely an educational exercise and doesn't have many games but I'd be happy if y'all checked it out. I updated it last week to work with newest main. https://github.com/sajattack/Hack_MiSTer
- Moondandy
- Top Contributor
- Posts: 535
- Joined: Mon May 25, 2020 2:14 am
- Location: Edinburgh, Scotland
- Has thanked: 32 times
- Been thanked: 102 times
Re: Nand2Tetris/Hack Core
Hey, that's really cool you made a core. I'm not entirely sure what this is or what games can be played, and how to set it up to play them. Are you able to give a write up of what it is and how to set it up? Would be worth adding to the readme file on GitHub, hopefully with that you will get some more people downloading and get some feedback.
Maybe Pezz 82 will give it a bump on one of his update videos and perhaps it could even be added to Main.
Do you plan to work on any more cores?
Maybe Pezz 82 will give it a bump on one of his update videos and perhaps it could even be added to Main.
Do you plan to work on any more cores?
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Nand2Tetris/Hack Core
Pretty much the only game it runs is one player Pong. Get the Pong.bin here https://github.com/sajattack/Hack_MiSTe ... aster/roms and place it in /media/fat/games/Hack . I was disappointed many of the games written for the platform have larger memory requirements than what are actually specified. The repository links to the website for nand2tetris which has a video that explains what it is. I also ported the CHIP-8 core from MiST and have thought about doing Fairchild Channel F.
- Moondandy
- Top Contributor
- Posts: 535
- Joined: Mon May 25, 2020 2:14 am
- Location: Edinburgh, Scotland
- Has thanked: 32 times
- Been thanked: 102 times
Re: Nand2Tetris/Hack Core
A Fairchild F core would be great, that is one glaring hole in Mister's coverage of the early consoles. Hopefully it isn't too tricky. Quite surprised no one has done it already.
Re: Nand2Tetris/Hack Core
A Channel F core would be really great but... i wonder, since the Channel F has a "second layer of controls" on the button, how would it work on a regular joypad?
• FireBee • Falcon030/040/060 • MiSTer • TT • (Mega)STe • Suska III-B • Suska III-C • (Mega)ST •
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Nand2Tetris/Hack Core
It has a very unusual CPU. So not a drop-in z80 or 6502 like a lot of other cores. But it's fairly simplistic in it's operation. Should be doable.
- Moondandy
- Top Contributor
- Posts: 535
- Joined: Mon May 25, 2020 2:14 am
- Location: Edinburgh, Scotland
- Has thanked: 32 times
- Been thanked: 102 times
Re: Nand2Tetris/Hack Core
I had a play of Pong, a basic but fun one player version. Do any other games run on it or have they all failed to adhere to the memory restrictions?
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Nand2Tetris/Hack Core
Yeah it's really quite unfortunate that the course encourages students to develop their games in a simulator with no memory restrictions. Because if you actually try to run them with the specified memory limit, they fail. I have a friend who started developing a game within the memory limits but it's unfinished. I believe it's in the repo under "pumpkin"
- Moondandy
- Top Contributor
- Posts: 535
- Joined: Mon May 25, 2020 2:14 am
- Location: Edinburgh, Scotland
- Has thanked: 32 times
- Been thanked: 102 times
Re: Nand2Tetris/Hack Core
Any plans to add the core into Main? Is there more you are wanting to do to it?
Hopefully more people make games that actually run on the spec.
Hopefully more people make games that actually run on the spec.
Re: Nand2Tetris/Hack Core
It's a nice core, but including it into Main somehow contradicts the whole Nand2Teris project.
The whole purpose of the project is to build a "computer" in software (emulation) or in fpga yourself. It's not about running software on that "computer" but to understand the principles of a modern computer.
The whole purpose of the project is to build a "computer" in software (emulation) or in fpga yourself. It's not about running software on that "computer" but to understand the principles of a modern computer.
We raise hopes here...until they're old enough to fend for themselves.
--Mike Callahan
--Mike Callahan
Re: Nand2Tetris/Hack Core
As soon that I've got my Jack compiler done, I'll maybe create another Hack Game, just to get some ideas about the design of OO high level languages. I plan to make my own Hack core for the DE-10 nano, but as I'm still on the 2nd nand2tetris course yet, both projects might take some time.
Re: Nand2Tetris/Hack Core
Code: Select all
// I'd love to make this out of nand gates but my fpga would explode
module RAM16K(
input clk,
input [15:0] in,
...
endmodule
I will have a deeper look into your implementation. My own verilog knowledge is very rudimentary.
Re: Nand2Tetris/Hack Core
I'm taking a class based on the Coursera / Nand2Tetris course as well and had the same thought of trying to make the core. Glad to see someone else had the same thought. I'll have to check this out after the class is finished. I think it would be great to have a 'Hack' core here for further educational value, or perhaps a write up guide to help others create their own.
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Nand2Tetris/Hack Core
What are the specs of this machine?
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Nand2Tetris/Hack Core
Anyone?
I haven't found anything concrete in the Nand2Tetris course pages. How does it compare to Gigatron? I wrote a full spec of Gigatron here: viewtopic.php?p=11342#p11342
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Nand2Tetris/Hack Core
It's a 16 bit machine that runs at about 1 million instructions per sec in my implementation, but the instructions are very RISC and hardly do anything. For example iirc a memory access requires two instructions. Resolution is 512x256 1bpp. 16384 16 bit words of RAM and 32768 16 bit words of instruction ROM.