32 bit fantasy computer
Note that fox32rom provides abstraction layers for most of these bus devices.
Debug output to the host terminal.
0x80000000 - 0x8000031F
Format is 0x80000XYY where X = setting and YY = overlay number.
0 - position in format 0xYYYYXXXX where XXXX is the X position and YYYY is the Y position.
1 - size in format 0xYYYYXXXX where XXXX is the width and YYYY is the height.
2 - framebuffer pointer.
3 - enable status.
0x80000400 - 0x80000401
Mouse position and button states.
Note that the clicked and released state bits must be manually cleared, the held bit is the only one that updates automatically.
Format is 0x8000040X where X = setting.
0 - button states in format 0b00000XYZ where X is the held state, Y is the released state, and Z is the clicked state.
1 - position in format 0xYYYYXXXX where XXXX is the X position and YYYY is the Y position.
Pop one scancode from the keyboard buffer, or return zero if the buffer is empty.
Enable audio playback if a non-zero word is written.
Note that the audio buffer swap interrupt vector (address 0x000003F8 / vector 0xFE) should be valid before enabling audio playback if interrupts are enabled.