mirror of
https://github.com/buserror/mii_emu.git
synced 2024-09-27 01:54:46 +00:00
Sorted muu_sw.h
Also added a cycle-count test Signed-off-by: Michel Pollet <buserror@gmail.com>
This commit is contained in:
parent
f9f5cbbd0e
commit
08e1ff861e
46
src/mii_sw.h
46
src/mii_sw.h
@ -1,5 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* mii_sw.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2023 Michel Pollet <buserror@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -59,27 +64,29 @@ enum {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is for a bitfield in mii_t that keeps track of the state of the
|
||||||
|
* softswitches used for memory mapping and video.
|
||||||
|
*/
|
||||||
enum {
|
enum {
|
||||||
B_SW80STORE = ( 0),
|
B_SW80STORE = ( 0),
|
||||||
// B_SWVBL = ( 1),
|
B_SWALTCHARSET = ( 1),
|
||||||
B_SWALTCHARSET = ( 2),
|
B_SW80COL = ( 2),
|
||||||
B_SW80COL = ( 3),
|
B_SWTEXT = ( 3),
|
||||||
B_SWTEXT = ( 4),
|
B_SWMIXED = ( 4),
|
||||||
B_SWMIXED = ( 5),
|
B_SWPAGE2 = ( 5),
|
||||||
B_SWPAGE2 = ( 6),
|
B_SWHIRES = ( 6),
|
||||||
B_SWHIRES = ( 7),
|
B_SWRAMRD = ( 7),
|
||||||
B_SWRAMRD = ( 8),
|
B_SWRAMWRT = ( 8),
|
||||||
B_SWRAMWRT = ( 9),
|
B_SWINTCXROM = ( 9),
|
||||||
B_SWINTCXROM = (10),
|
B_SWALTPZ = (10),
|
||||||
B_SWALTPZ = (11),
|
B_SWSLOTC3ROM = (11),
|
||||||
B_SWSLOTC3ROM = (12),
|
B_BSRWRITE = (12),
|
||||||
B_BSRWRITE = (13),
|
B_BSRREAD = (13),
|
||||||
B_BSRREAD = (14),
|
B_BSRPAGE2 = (14),
|
||||||
B_BSRPAGE2 = (15),
|
B_SWDHIRES = (15),
|
||||||
B_SWDHIRES = (16),
|
|
||||||
|
|
||||||
M_SW80STORE = (1 << B_SW80STORE),
|
M_SW80STORE = (1 << B_SW80STORE),
|
||||||
// M_SWVBL = (1 << B_SWVBL),
|
|
||||||
M_SWALTCHARSET = (1 << B_SWALTCHARSET),
|
M_SWALTCHARSET = (1 << B_SWALTCHARSET),
|
||||||
M_SW80COL = (1 << B_SW80COL),
|
M_SW80COL = (1 << B_SW80COL),
|
||||||
M_SWTEXT = (1 << B_SWTEXT),
|
M_SWTEXT = (1 << B_SWTEXT),
|
||||||
@ -100,7 +107,6 @@ enum {
|
|||||||
// unused is to prevent the stupid warnings about unused static stuff
|
// unused is to prevent the stupid warnings about unused static stuff
|
||||||
static const char __attribute__((unused)) *mii_sw_names[] = {
|
static const char __attribute__((unused)) *mii_sw_names[] = {
|
||||||
"80STORE",
|
"80STORE",
|
||||||
"VBL",
|
|
||||||
"ALTCHARSET",
|
"ALTCHARSET",
|
||||||
"80COL",
|
"80COL",
|
||||||
"TEXT",
|
"TEXT",
|
||||||
|
@ -439,6 +439,25 @@ int main()
|
|||||||
_run_this("SED ADC 99", doSED_ADC(0x99, 0), 0x99, N | D, 0);
|
_run_this("SED ADC 99", doSED_ADC(0x99, 0), 0x99, N | D, 0);
|
||||||
_run_this("SED ADC 99", doSED_ADC(0x99, 1), 0x00, C | D, 0);
|
_run_this("SED ADC 99", doSED_ADC(0x99, 1), 0x00, C | D, 0);
|
||||||
_run_this("SED ADC BD", doSED_ADC(0xBD, 0), 0x23, C | D, 0);
|
_run_this("SED ADC BD", doSED_ADC(0xBD, 0), 0x23, C | D, 0);
|
||||||
|
|
||||||
|
_run_this("LDA ($aa)",
|
||||||
|
" LDA #$00\n"
|
||||||
|
" TAY\n"
|
||||||
|
" TYA\n"
|
||||||
|
" STA $c064\n"
|
||||||
|
" LDX #$00\n"
|
||||||
|
" LDA $c070\n"
|
||||||
|
" LDY #$00\n"
|
||||||
|
" NOP\n"
|
||||||
|
" NOP\n"
|
||||||
|
"l LDA $c064,X\n"
|
||||||
|
" BPL end\n"
|
||||||
|
" INY \n"
|
||||||
|
" BNE l\n"
|
||||||
|
" DEY \n"
|
||||||
|
"end BRK\n",
|
||||||
|
0xAA, N, 1);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// _run_this("SED ADC FF", doSED_ADC(0xFF, 0), 0x65, C | D | N, 0);
|
// _run_this("SED ADC FF", doSED_ADC(0xFF, 0), 0x65, C | D | N, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user