Compare commits

...

9 Commits

Author SHA1 Message Date
93da83704f fix chip8 key press 2026-05-15 20:31:09 +02:00
2d53a59399 brk, mmap, lseek 2026-03-10 16:41:05 +01:00
7a893076fb disassemble printf 2026-03-10 14:26:07 +01:00
4c7073657f Hello, World! 2026-03-09 17:12:28 +01:00
2252e1fa75 we can now execute crt0 2026-03-09 16:23:45 +01:00
20d8953220 we can now disassemble riscv64-linux-musl-gcc hello world! 2026-03-09 15:35:07 +01:00
cc868fa6ec 100 instructions 2026-03-09 15:26:41 +01:00
daad92956e fix pc for 2 byte instructions 2026-03-09 14:40:18 +01:00
1d8b889771 disassemble some of the C instructions 2026-03-09 13:10:08 +01:00
5 changed files with 1151 additions and 151 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@
/chip8
/mos6502
/riscv64
/riscv64-linux-musl-cross
/dump

View File

@@ -1,4 +1,4 @@
BSD 3-Clause License
BSD 2-Clause License
Copyright (c) 2025-2026, Antoni Piasecki
@@ -12,10 +12,6 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

View File

@@ -2,7 +2,7 @@
Emulators written in C and C++
* `riscv64.cc` - [RV64IM instruction set](https://en.wikipedia.org/wiki/RISC-V) (more extensions coming soon-ish)
* `riscv64.cc` - [RV64IMAC instruction set](https://en.wikipedia.org/wiki/RISC-V) (more extensions coming soon-ish)
* `chip8.c` - [CHIP8](https://en.wikipedia.org/wiki/CHIP-8)
* `mos6502.c` - [MOS 6502](https://en.wikipedia.org/wiki/MOS_Technology_6502)

View File

@@ -345,7 +345,7 @@ void chip8_step(CHIP8 *c) {
break;
case 0x0A: {
uint8_t key_pressed = 0;
while (!key_pressed && WindowShouldClose()) {
while (!key_pressed && !WindowShouldClose()) {
for (size_t i = 0; i < 16; i++) {
if (IsKeyDown(keyboard_map[i])) {
key_pressed = 1;

1290
riscv64.cc

File diff suppressed because it is too large Load Diff