diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-01-27 13:42:57 -0500 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-01-27 13:42:57 -0500 |
commit | cd6982e5da1f5facdc1e0154b3a27c01e8b076c9 (patch) | |
tree | c8db5ade59d054c6f88ff2ab2cb99df45b250fad /supervia.h | |
parent | 1700d8d10453ffe046438de0e6fbd496def915a1 (diff) |
- Fixed some bugs in the emulator.
- Started work on implementing the Super VIA emulation.
- Added support for disabling disassembly per
instruction, when in debug mode.
- Did some more work on rewriting the SuB Suite to
work with the new calling convention.
- Rewrote the symbol handling code in the emulator's
assembler, to make it both simpler, and to add
support for arbitrarily deep symbol scopes.
- Added support for arbitrarily deep local symbol
scopes.
For example, to declare a symbol of depth 2, you add
two '@' characters to the start of the symbol name.
In other words, the number of '@' characters before
the symbol name is what determines the scope of that
symbol.
And to use a symbol thats outside the current
scope, you would use the same syntax as using a
struct member, so you would do `global.local`.
Diffstat (limited to 'supervia.h')
-rw-r--r-- | supervia.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/supervia.h b/supervia.h new file mode 100644 index 0000000..8afc45d --- /dev/null +++ b/supervia.h @@ -0,0 +1,25 @@ + +struct shift_reg { + union reg data; /* Shift Register Data. */ + uint8_t bits; /* Serial data for each byte. */ + uint8_t ocount; /* Shift out counter. */ + uint8_t icount; /* Shift out counter. */ + uint8_t dir; /* Data direction for each byte. */ +}; + + +struct supervia { + union reg pa; /* Port A. */ + union reg pb; /* Port B. */ + union reg ddra; /* Port A Data Direction Register. */ + union reg ddrb; /* Port B Data Direction Register. */ + union reg t[4]; /* Timers 1-4. */ + struct shift_reg sr[4]; /* Shift Registers A-D. */ + union reg acr; /* Auxiliary Control Register. */ + union reg pcr; /* Peripheral Control Register. */ + union reg ifr; /* Interrupt Flags Register. */ + union reg ier; /* Interrupt Enable Register. */ + union reg rng[2]; /* Random Number Generator A, and B. */ + union reg dac[2]; /* DAC A, and B. */ + union reg adc[2]; /* ADC A, and B. */ +}; |