diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-05-12 23:49:49 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-05-12 23:49:49 +0100 |
commit | 2e1cf13e604121b9d1cb79ef7ca7a08b475eaadb (patch) | |
tree | b690e515a1c0e8c3e85fc549a11f8fd5669eb989 | |
parent | a20b308cfe92a8bb47c6896e7fdb24b15c2efd59 (diff) | |
download | tr8vm-2e1cf13e604121b9d1cb79ef7ca7a08b475eaadb.tar.gz tr8vm-2e1cf13e604121b9d1cb79ef7ca7a08b475eaadb.zip |
We can do 4MIPS fine!
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | vm.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -9,7 +9,7 @@ TR8 is an 8-bit fantasy console inspired by MIPS, Z80 and 6502 real world CPUs. ``` Display: 128 x 128 pixels 16 colors Memory: 64K -CPU: TR-8, 8M VM instr/sec +CPU: TR-8, 4M VM instr/sec Sound: TBD ``` @@ -225,7 +225,7 @@ A label is defined as an ID that ends in `:`. All the instructions are 16-bit, with the exception of `JMP addr` and `CALL addr` that use an extra 16-bit parameter for "addr". All the instructions take -the same time to run, and being 8 MIPS it can fit `133333` instructions in a +the same time to run, and being 4 MIPS it can fit `66666` instructions in a frame (at 60Hz). There are no 16-bit registers, but they can be implemented with 2 registers, @@ -51,8 +51,8 @@ #define INT_VECTOR ((uin16_t)0xff00) -/* (1 / 60.) * 8000000 */ -#define INSTR_PER_FRAME 133333L +/* (1 / 60.) * 4000000 */ +#define INSTR_PER_FRAME 66666L static uint8_t flags(uint8_t *f, uint16_t v, uint8_t mask) { |