v8.0
This web app can best be thought of as an emulator for my own theoretical computer. It's not meant to be a guide to how computer hardware works.
It's got sprites, a background tilemap, 16 colours, and is programmable in Assembly.
Changes:
Shadow registers (when you read or write to this area it will go to the register instead.)
#0 - Program Counter
#2 - A
#4 - B
#6 - C
#8 - F
#E - X scroll
#F - Y scroll
#10 - #100 - CPU Stack
RAM | #100 - #5000
High level language area (BASIC or Assembly)
VRAM | #5000 - #5FFF
#5000 - #501F - palette
#5020 - #561F - tiles
#5620 - #581F - background tilemap
#5820 - #5FFC - sprites
#5FFC - text colour
#5FFE - background colour
ROM | #6000 - #6FFF
This area is reserved for the BIOS.
RAM | #7000 - #8FFF
User RAM.
RAM | #B000 - #F000
Low level language area (machine code) kept separate so it doesn't overwrite.
Reserved/IO | #F000 - #FFFF
#F200 - Current key pressed on the keyboard
#FFFE - kill switch (when branched or jumped to, the computer will stop executing.)
LOAD will prompt for a text file, the language it expects is based on whether you're in ALMOND, BRAZIL, or Raw Binary Mode
; creates a comment, whether it's in-line or at the start.
A tab between the command and argument instead of a space is supported.
ExampleI've built an IDE to make writing programs easier.
The Run button will automatically change the mode before importing the program.
Type "help" to bring up the full list of commands.
Graphics Mode is enabled when your program runs
Each 16x16 tile is stored in 64-word chunks starting at #5020
There's enough room to store 128 tiles.
Each digit of hex corrosponds to the colour for that pixel, so each word makes 4 pixels.
I've built a tile editor to make creating and exporting them easier.
The screen is made up of a tilemap, 21 tiles across, and 12 tiles down.
Starting at #5620, each tile is a byte, the first bit is the flipX flag, and the rest of the byte indicates the tile.
Each sprite is 2 words, starting at #5820. The first byte is the tile, the second byte is Y, the third byte + first half of fourth byte is X, and the last nibble is Flags.
in hex: TTYY XXXFThere is enough room for 128 sprites.