Hacker News new | past | comments | ask | show | jobs | submit login

> I know it's not as legitimately retro (in terms of chips), but .. what does matter is having an accessible system to play about with ... (ie how I felt about my ZX spectrum back in the day).

Hopefully we'll see more focus on RISC-V chips in the future. A RISC-V based, maximite-like system would bring assembly-level programming that's as simple and accessible as it could feasibly be, and quite comparable to the ease of writing assembly for the old 8-bit chips.




I had started on a project like this, which I was calling "Retro V" (retro 5... is alive! for the 80s movie reference...)

It's a PicoRV32 core + a simple 'retro' style video display processor (sprites, character generator, and 640x480 8 bit palette indexed bitmap graphics) that outputs on HDMI/DVI, plus 512KB of SRAM that runs on the CMod A35t board (Artix 7 35t FPGA + SRAM on DIP friendly package), which I intended on making a simple daughterboard for (to hook up PS/2 keyboard & mouse, add some extra RAM etc.)

The "OS" was to be mid-80s style -- boot to a REPL, either a BASIC or something like Lua, with simple DOS commands and an assembly language monitor.

I got pretty far but stalled out around Christmas when things got a bit busy personally for me, and I ran into the complications of getting the QSPI flash chip interfaced for storing programs.

I might pick this project back up again. I think it has potential.

BTW I don't actually think RISC-V assembly is all that great for beginners. It's a bit awkward to write directly. For example, to set a 32-bit register with an immediate value requires setting the upper 20 bits followed by the lower 12. Similar with PC jumps, etc.

In general RISC architecture assembly language is meant to be written by C compilers, not humans.

I actually think beginners might be better off with a CISC instruction set (like the 68k or similar).

EDIT: Thinking more about this, out of all the architectures that GCC currently supports, 68k seems to be the most "retro" and easiest/most enjoyable to write by hand.


Any project that will only be programmed in BASIC, C or something will make the processor it uses irrelevant. Only if there is some assembly will the processor matter.

One fun pseudo-retro project would be an incremental BASIC compiler which allows simple inline assembly. That is: any given line can be either a BASIC statement or an assembly instruction. The "incremental" part would be that every time a new line is entered the program is patched to include it. The program would be stored in machine language with two helper tables: line number to address mapping and variable name to address mapping. When you LIST it would decompile each line as it goes to the screen (easy to do since the compiler wouldn't have any optimizations). BASIC already has to include a garbage collector to deal with strings so this would not add too much complexity.

I agree that the 68000 is nicer to program in assembly than the RISC-V. I started a simple RISC (only a short presentation so far) with the goal of having nice assembly code: https://github.com/jeceljr/baby42


> It's a bit awkward to write directly. For example, to set a 32-bit register with an immediate value requires setting the upper 20 bits followed by the lower 12. Similar with PC jumps, etc.

Yes, IIRC the standard description of the RISC-V ISA includes assembly macro-instructions that can be programmatically expanded into sequences for things like those. Similar to how "mov" is actually implemented as a special case of "add immediate".


Oh for sure, that's great for writing, but when disasembling or looking at the asm listing for a C program you don't get that. Which happens a lot while working on a low level machine like this, especially when building it :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: