First implementation of Game Controller (Joystick / Paddle)

This commit is contained in:
tudnai 2020-05-20 09:56:35 -07:00
parent 0fef4708f8
commit 1b4985d3c8
4 changed files with 378 additions and 296 deletions

View File

@ -189,6 +189,7 @@
3262F37523E169F8008BDB95 /* spk_up.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = spk_up.wav; sourceTree = "<group>"; };
3264261023284F6F008B615F /* Apple2_mmio_8bit_ioaddr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Apple2_mmio_8bit_ioaddr.h; sourceTree = "<group>"; };
326426112328ADF4008B615F /* Apple_II_ROM.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = Apple_II_ROM.s; sourceTree = "<group>"; };
3268E68E2474E24900047474 /* paddle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = paddle.h; sourceTree = "<group>"; };
326ED2EE232D7A0000A41337 /* 6502_functional_test.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = 6502_functional_test.bin; sourceTree = SOURCE_ROOT; };
32A9F72B24668D26004902A1 /* apple-rainbow.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "apple-rainbow.jpg"; sourceTree = "<group>"; };
32A9F7482467B60B004902A1 /* speaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speaker.h; sourceTree = "<group>"; };
@ -315,8 +316,9 @@
isa = PBXGroup;
children = (
32A9F7472467B5DF004902A1 /* audio */,
325EB63B23FA57C000C6B4A4 /* mem */,
325EB63323F8863100C6B4A4 /* disk */,
3268E68D2474E18F00047474 /* game */,
325EB63B23FA57C000C6B4A4 /* mem */,
);
path = dev;
sourceTree = "<group>";
@ -424,6 +426,14 @@
path = Resources;
sourceTree = "<group>";
};
3268E68D2474E18F00047474 /* game */ = {
isa = PBXGroup;
children = (
3268E68E2474E24900047474 /* paddle.h */,
);
path = game;
sourceTree = "<group>";
};
32A9F7472467B5DF004902A1 /* audio */ = {
isa = PBXGroup;
children = (

View File

@ -6,41 +6,40 @@
contextName = "AND:6502_instr_logic.h">
</ContextState>
<ContextState
contextName = "set_flags_V:common.h">
contextName = "LSRA:6502_instr_shift_rotate.h">
<PersistentStrings>
<PersistentString
value = "test">
value = "m6502.A">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "read_rom:6502.c">
contextName = "specialized closure #1 in ViewController.Update():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "Apple2_64K_AUX + 0xC600">
</PersistentString>
<PersistentString
value = "Apple2_64K_RAM + 0xC600">
</PersistentString>
<PersistentString
value = "(void*)rom">
</PersistentString>
<PersistentString
value = "strlen(fullPath)">
</PersistentString>
<PersistentString
value = "(void*)Apple2_64K_RAM">
value = "self.HiRes.frame">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "rel_addr:Apple2_mmio.h">
contextName = "read_woz:6502.c">
<PersistentStrings>
<PersistentString
value = "r">
</PersistentString>
<PersistentString
value = "foffs + woz_chunk_header.size">
</PersistentString>
<PersistentString
value = "woz_chunk_header.size">
</PersistentString>
<PersistentString
value = "sizeof(woz_chunk_header_t)">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "addr_ind_Y:Apple2_mmio.h">
</ContextState>
<ContextState
contextName = "spkr_playUpd:speaker.c">
contextName = "CMP:6502_instr_compare_test.h">
</ContextState>
<ContextState
contextName = "m6502_ColdReset:6502.c">
@ -54,66 +53,86 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "set_flags_NZC:common.h">
contextName = "STR:6502_instr_load_store.h">
<PersistentStrings>
<PersistentString
value = "(unsigned)0xFF">
</PersistentString>
<PersistentString
value = "(unsigned)test ">
value = "m6502">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "mach_msg_trap:(null)">
contextName = "m6502_Step:6502.c">
<PersistentStrings>
<PersistentString
value = "m6502.dbgLevel.trace">
</PersistentString>
<PersistentString
value = "RAM[0x51]">
</PersistentString>
<PersistentString
value = "disassembly">
</PersistentString>
<PersistentString
value = "m6502.A">
</PersistentString>
<PersistentString
value = "RAM">
</PersistentString>
<PersistentString
value = "RAM[0x50]">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.viewDidLoad():ViewController.swift">
contextName = "addr_abs:mmio.h">
<PersistentStrings>
<PersistentString
value = "y">
</PersistentString>
<PersistentString
value = "textLines">
</PersistentString>
<PersistentString
value = "hires.frame">
</PersistentString>
<PersistentString
value = "view">
</PersistentString>
<PersistentString
value = "hires.layer">
value = "cache">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.Reset(_:):ViewController.swift">
contextName = "addr_ind_Y:Apple2_mmio.h">
</ContextState>
<ContextState
contextName = "set_flags_NZCV:common.h">
<PersistentStrings>
<PersistentString
value = "m6502.pc">
value = "m6502">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ORA:6502_instr_logic.h">
</ContextState>
<ContextState
contextName = "BRA:6502_instr_branch.h">
contextName = "AppDelegate.Disk1_Selected(_:):AppDelegate.swift">
<PersistentStrings>
<PersistentString
value = "">
</PersistentString>
<PersistentString
value = "RAM[0x346f]">
value = "sender.identifier!.rawValue">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "spkr_switch:mmio.h">
<PersistentStrings>
<PersistentString
value = "freeBuffers">
</PersistentString>
<PersistentString
value = "BUFFER_COUNT">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm_set">
</PersistentString>
<PersistentString
value = "clkfrm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "PLA:6502_instr_stack.h">
</ContextState>
<ContextState
contextName = "LDA:6502_instr_load_store.h">
</ContextState>
<ContextState
contextName = "HiRes.initMetal():HiRes.swift">
<PersistentStrings>
@ -135,26 +154,37 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "set_flags_NZCV:common.h">
contextName = "JMP:6502_instr_call_ret_jump.h">
</ContextState>
<ContextState
contextName = "ViewController.createHiRes():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "m6502">
value = "container.frame">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "spkr_toggle:speaker.c">
contextName = "ADC:6502_instr_arithmetic.h">
</ContextState>
<ContextState
contextName = "HiRes.initHiResLineAddresses():HiRes.swift">
<PersistentStrings>
<PersistentString
value = "(clkfrm / (default_MHz_6502 / spkr_sample_rate))">
</PersistentString>
<PersistentString
value = "spkr_sample_idx">
value = "HiResLineAddrTbl">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "memread8:Apple2_mmio.h">
contextName = "spkr_playUpd:speaker.c">
</ContextState>
<ContextState
contextName = "mach_msg_trap:(null)">
<PersistentStrings>
<PersistentString
value = "RAM">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "textPageSelect:mmio.h">
@ -170,6 +200,170 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "memread8:Apple2_mmio.h">
</ContextState>
<ContextState
contextName = "set_flags_NZ:common.h">
</ContextState>
<ContextState
contextName = "pdl_read:paddle.h">
<PersistentStrings>
<PersistentString
value = "pdl_elapsed_time">
</PersistentString>
<PersistentString
value = "pdl_value[pdl]">
</PersistentString>
<PersistentString
value = "normalized_time &gt;= pdl_value[pdl] ? 255 : 0">
</PersistentString>
<PersistentString
value = "(3300 * 255/3300)">
</PersistentString>
<PersistentString
value = "(uint8_t)( pdl_value[pdl] * 512 * ( 1 - (pdl_elapsed_time / 3300.0) ) )">
</PersistentString>
<PersistentString
value = "1 * 512 * (1 - ( 3300 / 3300.0 ))">
</PersistentString>
<PersistentString
value = "normalized_time">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "PUSH:6502_instr_stack.h">
</ContextState>
<ContextState
contextName = "ViewController.viewDidLoad():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "y">
</PersistentString>
<PersistentString
value = "textLines">
</PersistentString>
<PersistentString
value = "hires.layer">
</PersistentString>
<PersistentString
value = "view">
</PersistentString>
<PersistentString
value = "hires.frame">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "dest_ind_Y:Apple2_mmio.h">
<PersistentStrings>
<PersistentString
value = "disassembly">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "CPY:6502_instr_compare_test.h">
<PersistentStrings>
<PersistentString
value = "m6502.Y">
</PersistentString>
<PersistentString
value = "(int)m6502.Y - imm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "set_flags_NZC:common.h">
<PersistentStrings>
<PersistentString
value = "(unsigned)test ">
</PersistentString>
<PersistentString
value = "(unsigned)0xFF">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "STA:6502_instr_load_store.h">
</ContextState>
<ContextState
contextName = "ORA:6502_instr_logic.h">
</ContextState>
<ContextState
contextName = "m6502_step:6502.c">
<PersistentStrings>
<PersistentString
value = "m6502">
</PersistentString>
<PersistentString
value = "bp1">
</PersistentString>
<PersistentString
value = "m6502.PC">
</PersistentString>
<PersistentString
value = "RAM">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "woz_read:woz.c">
<PersistentStrings>
<PersistentString
value = "m6502.clktime">
</PersistentString>
<PersistentString
value = "m6502.clktime + clkfrm - m6502.clklast">
</PersistentString>
<PersistentString
value = "m6502.clktime + clkfrm">
</PersistentString>
<PersistentString
value = "m6502.clklast">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "rel_addr:Apple2_mmio.h">
</ContextState>
<ContextState
contextName = "ViewController.Reset(_:):ViewController.swift">
<PersistentStrings>
<PersistentString
value = "m6502.pc">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "m6502_run:6502.c">
<PersistentStrings>
<PersistentString
value = "RAM[0x70]">
</PersistentString>
<PersistentString
value = "RAM[0x74]">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.setCPUClockSpeed(freq:):ViewController.swift">
<PersistentStrings>
<PersistentString
value = "MHz_6502">
</PersistentString>
<PersistentString
value = "mhz">
</PersistentString>
<PersistentString
value = "fps">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ioRead:Apple2_mmio.h">
<PersistentStrings>
@ -206,69 +400,13 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "CPY:6502_instr_compare_test.h">
contextName = "spkr_toggle:speaker.c">
<PersistentStrings>
<PersistentString
value = "m6502.Y">
value = "(clkfrm / (default_MHz_6502 / spkr_sample_rate))">
</PersistentString>
<PersistentString
value = "(int)m6502.Y - imm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "LSRA:6502_instr_shift_rotate.h">
<PersistentStrings>
<PersistentString
value = "m6502.A">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "STR:6502_instr_load_store.h">
<PersistentStrings>
<PersistentString
value = "m6502">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "PLA:6502_instr_stack.h">
</ContextState>
<ContextState
contextName = "BNE:6502_instr_branch.h">
</ContextState>
<ContextState
contextName = "PUSH:6502_instr_stack.h">
</ContextState>
<ContextState
contextName = "ViewController.Update():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "y * (textCols + lineEndChars) + x ">
</PersistentString>
<PersistentString
value = "textCols">
</PersistentString>
<PersistentString
value = "textLines * (textCols+1) + textCols">
</PersistentString>
<PersistentString
value = "textLines">
</PersistentString>
<PersistentString
value = "txtArr">
</PersistentString>
<PersistentString
value = "clkfrm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.createHiRes():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "container.frame">
value = "spkr_sample_idx">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -276,10 +414,10 @@
contextName = "HiRes.draw(_:):HiRes.swift">
<PersistentStrings>
<PersistentString
value = "ctx?.height">
value = "linAddr">
</PersistentString>
<PersistentString
value = "ctx?.data">
value = "shadowScreen">
</PersistentString>
<PersistentString
value = "ctx?.width">
@ -302,55 +440,62 @@
<PersistentString
value = "HiRes.blockCols">
</PersistentString>
<PersistentString
value = "ctx?.height">
</PersistentString>
<PersistentString
value = "ctx?.bitsPerComponent">
</PersistentString>
<PersistentString
value = "linAddr">
</PersistentString>
<PersistentString
value = "shadowScreen">
value = "ctx?.data">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ioRead:mmio.h">
contextName = "set_flags_V:common.h">
<PersistentStrings>
<PersistentString
value = "m6502.PC">
value = "test">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.currentContext.getter:ViewController.swift">
contextName = "HiRes.compute():HiRes.swift">
<PersistentStrings>
<PersistentString
value = "NSGraphicsContext.current">
value = "computePipelineState.maxTotalThreadsPerThreadgroup">
</PersistentString>
<PersistentString
value = "result[2]">
</PersistentString>
<PersistentString
value = "UnsafeRawBufferPointer(result)">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "AppDelegate.Disk1_Selected(_:):AppDelegate.swift">
<PersistentStrings>
<PersistentString
value = "sender.identifier!.rawValue">
</PersistentString>
</PersistentStrings>
contextName = "init:6502.c">
</ContextState>
<ContextState
contextName = "woz_read:woz.c">
contextName = "ViewController.Update():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "m6502.clktime">
value = "y * (textCols + lineEndChars) + x ">
</PersistentString>
<PersistentString
value = "m6502.clktime + clkfrm - m6502.clklast">
value = "textCols">
</PersistentString>
<PersistentString
value = "m6502.clktime + clkfrm">
value = "textLines * (textCols+1) + textCols">
</PersistentString>
<PersistentString
value = "m6502.clklast">
value = "textLines">
</PersistentString>
<PersistentString
value = "clkfrm">
</PersistentString>
<PersistentString
value = "txtArr">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -372,171 +517,55 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "set_flags_NZ:common.h">
contextName = "ioRead:mmio.h">
<PersistentStrings>
<PersistentString
value = "m6502.PC">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "CMP:6502_instr_compare_test.h">
contextName = "ViewController.currentContext.getter:ViewController.swift">
<PersistentStrings>
<PersistentString
value = "NSGraphicsContext.current">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "read_rom:6502.c">
<PersistentStrings>
<PersistentString
value = "Apple2_64K_AUX + 0xC600">
</PersistentString>
<PersistentString
value = "(void*)rom">
</PersistentString>
<PersistentString
value = "Apple2_64K_RAM + 0xC600">
</PersistentString>
<PersistentString
value = "strlen(fullPath)">
</PersistentString>
<PersistentString
value = "(void*)Apple2_64K_RAM">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "POP:6502_instr_stack.h">
</ContextState>
<ContextState
contextName = "LDA:6502_instr_load_store.h">
contextName = "BNE:6502_instr_branch.h">
</ContextState>
<ContextState
contextName = "m6502_step:6502.c">
contextName = "BRA:6502_instr_branch.h">
<PersistentStrings>
<PersistentString
value = "m6502">
value = "">
</PersistentString>
<PersistentString
value = "bp1">
</PersistentString>
<PersistentString
value = "m6502.PC">
</PersistentString>
<PersistentString
value = "RAM">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "HiRes.initHiResLineAddresses():HiRes.swift">
<PersistentStrings>
<PersistentString
value = "HiResLineAddrTbl">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "specialized closure #1 in ViewController.Update():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "self.HiRes.frame">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "JMP:6502_instr_call_ret_jump.h">
</ContextState>
<ContextState
contextName = "STA:6502_instr_load_store.h">
</ContextState>
<ContextState
contextName = "addr_abs:mmio.h">
<PersistentStrings>
<PersistentString
value = "cache">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "m6502_Step:6502.c">
<PersistentStrings>
<PersistentString
value = "m6502.dbgLevel.trace">
</PersistentString>
<PersistentString
value = "RAM[0x51]">
</PersistentString>
<PersistentString
value = "disassembly">
</PersistentString>
<PersistentString
value = "RAM">
</PersistentString>
<PersistentString
value = "RAM[0x50]">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ADC:6502_instr_arithmetic.h">
</ContextState>
<ContextState
contextName = "m6502_run:6502.c">
<PersistentStrings>
<PersistentString
value = "RAM[0x70]">
</PersistentString>
<PersistentString
value = "RAM[0x74]">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "HiRes.compute():HiRes.swift">
<PersistentStrings>
<PersistentString
value = "UnsafeRawBufferPointer(result)">
</PersistentString>
<PersistentString
value = "result[2]">
</PersistentString>
<PersistentString
value = "computePipelineState.maxTotalThreadsPerThreadgroup">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "init:6502.c">
</ContextState>
<ContextState
contextName = "read_woz:6502.c">
<PersistentStrings>
<PersistentString
value = "r">
</PersistentString>
<PersistentString
value = "foffs + woz_chunk_header.size">
</PersistentString>
<PersistentString
value = "woz_chunk_header.size">
</PersistentString>
<PersistentString
value = "sizeof(woz_chunk_header_t)">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "dest_ind_Y:Apple2_mmio.h">
<PersistentStrings>
<PersistentString
value = "disassembly">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "spkr_switch:mmio.h">
<PersistentStrings>
<PersistentString
value = "freeBuffers">
</PersistentString>
<PersistentString
value = "BUFFER_COUNT">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm_set">
</PersistentString>
<PersistentString
value = "clkfrm">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.setCPUClockSpeed(freq:):ViewController.swift">
<PersistentStrings>
<PersistentString
value = "MHz_6502">
</PersistentString>
<PersistentString
value = "mhz">
</PersistentString>
<PersistentString
value = "fps">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm">
value = "RAM[0x346f]">
</PersistentString>
</PersistentStrings>
</ContextState>

41
src/dev/game/paddle.h Normal file
View File

@ -0,0 +1,41 @@
//
// paddle.h
// A2Mac
//
// Created by Tamas Rudnai on 5/19/20.
// Copyright © 2020 GameAlloy. All rights reserved.
//
#ifndef paddle_h
#define paddle_h
#include "6502.h"
#define PDL_MAX_TIME 3300.0
#define PDL_TIME_DECAY ( 255.0 / PDL_MAX_TIME )
uint64_t pdl_reset_time = 0;
uint64_t pdl_current_time = 0;
uint64_t pdl_elapsed_time = 0;
float pdl_value[4] = { 0.5, 0.0, 1.0, 0.1 };
INLINE uint8_t pdl_reset() {
pdl_reset_time = m6502.clktime + clkfrm;
return 0;
}
INLINE uint8_t pdl_read( uint8_t pdl ) {
pdl_current_time = m6502.clktime + clkfrm;
pdl_elapsed_time = pdl_current_time - pdl_reset_time;
double normalized_time = pdl_elapsed_time / PDL_MAX_TIME; // 0: started, >= 1 ended
// printf("PDL%d: %d\n", pdl, (uint8_t) ( pdl_value[pdl] * 512 * ( 1 - (pdl_elapsed_time / PDL_MAX_TIME) )) );
// return (uint8_t) ( pdl_value[pdl] * 512 * ( 1 - (pdl_elapsed_time / PDL_MAX_TIME) ) );
return normalized_time >= pdl_value[pdl] ? 0 : 0x80;
}
#endif /* paddle_h */

View File

@ -14,6 +14,7 @@
#include "disk.h"
#include "woz.h"
#include "speaker.h"
#include "paddle.h"
typedef union address16_u {
@ -486,11 +487,12 @@ INLINE uint8_t ioRead( uint16_t addr ) {
case (uint8_t)io_PDL1:
case (uint8_t)io_PDL2:
case (uint8_t)io_PDL3:
// if ( RAM[addr] > 127 ) {
// RAM[addr]--;
// }
return Apple2_64K_RAM[addr];
printf("PDL%d: %d\n", addr - io_PDL0, pdl_read( addr - io_PDL0 ));
return pdl_read( addr - io_PDL0 );
case (uint8_t)io_PDL_STROBE:
return pdl_reset();
case (uint8_t)io_MEM_RDRAM_NOWR_2:
case (uint8_t)io_MEM_RDROM_WRAM_2:
case (uint8_t)io_MEM_RDROM_NOWR_2: