You are browsing as a guest. Sign up (or log in) to start making projects!

1h 8m 40s logged

New IO registers

I added new IO registers. Display mode, Random number, System control and Timer. The screenshot shows where all of these are found in memory.

The timer takes up four bytes, the rest all one.

The Display mode register is a read-write register that stores one byte to determine the display mode. 0 for text, 1 for video. The panel updates to this every CPU cycle internally.

The random number register simply returns a random byte. It is read-only.

The System control register is a write-only register that doesn’t actually save a value. If you write 1 to it, the system will shut down. If you write 2, the system will reboot. If you write any other value the system will continue operation.

And finally the Timer register. The Timer is a read-only register that stores the uptime of the system as four bytes. It stores this is in milliseconds.

Changes

I changed the way the keyboard register stores the last key. Instead of a single byte, it is now a buffer. The status is 0 if the buffer is empty. The buffer has FIFO structure.

What will I work on next?

Next I want to make a system for interrupts. This way the operating system or any other program running on the emulator can catch certain events such as Timer updates (With programmable interval, preferably), Keystrokes and maybe even more in the future, we’ll see!

0
1

Comments 0

No comments yet. Be the first!