more work

This commit is contained in:
Trevor Merritt 2024-10-20 06:12:12 -04:00
parent f6751557c6
commit e927f6785f
7 changed files with 694 additions and 539 deletions

147
.idea/workspace.xml generated
View File

@ -8,10 +8,13 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9bcba7c5-ac1d-4216-959a-63faee7047bc" name="Changes" comment=""> <list default="true" id="9bcba7c5-ac1d-4216-959a-63faee7047bc" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/gemmautil/src/bin/ch8asm.rs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/gemmautil/tests/assmber_tests.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gemma/src/chip8/instructions.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemma/src/chip8/instructions.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gemma/src/constants.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemma/src/constants.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gemmaegui/src/bin/gemmaegui_viewer.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemmaegui/src/bin/gemmaegui_viewer.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gemmautil/src/bin/ch8asm.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemmautil/src/bin/ch8asm.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gemmautil/src/bin/ch8disasm.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemmautil/src/bin/ch8disasm.rs" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gemmautil/src/bin/ch8disasm.rs" beforeDir="false" afterPath="$PROJECT_DIR$/gemmautil/src/bin/ch8disasm.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/test/gemma_disassembler_1_chip_logo_ch8_asm.asc" beforeDir="false" afterPath="$PROJECT_DIR$/resources/test/gemma_disassembler_1_chip_logo_ch8_asm.asc" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -39,78 +42,78 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"Cargo.Build `Run emmagui`.executor": "Run", &quot;Cargo.Build `Run emmagui`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Run gemmaegui_viewer`.executor": "Run", &quot;Cargo.Build `Run gemmaegui_viewer`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Run gemmaegui`.executor": "Run", &quot;Cargo.Build `Run gemmaegui`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Run gemmaimgui`.executor": "Run", &quot;Cargo.Build `Run gemmaimgui`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Run trevors_chip8_toy`.executor": "Run", &quot;Cargo.Build `Run trevors_chip8_toy`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::computer::test::cls_test`.executor": "Run", &quot;Cargo.Build `Test chip8::computer::test::cls_test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::instructions::test::LdStVx_test`.executor": "Run", &quot;Cargo.Build `Test chip8::instructions::test::LdStVx_test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::instructions::test::random_produces_different_numbers`.executor": "Run", &quot;Cargo.Build `Test chip8::instructions::test::random_produces_different_numbers`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::instructions::test::series8xy6_corex_tests`.executor": "Run", &quot;Cargo.Build `Test chip8::instructions::test::series8xy6_corex_tests`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::instructions::test::shl_vx_vy_test`.executor": "Run", &quot;Cargo.Build `Test chip8::instructions::test::shl_vx_vy_test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::util::test::byte_to_bool_changes`.executor": "Run", &quot;Cargo.Build `Test chip8::util::test::byte_to_bool_changes`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::util::test::ubln`.executor": "Run", &quot;Cargo.Build `Test chip8::util::test::ubln`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::video::test::poke_byte_test`.executor": "Run", &quot;Cargo.Build `Test chip8::video::test::poke_byte_test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test chip8::video::test::poke_byte`.executor": "Run", &quot;Cargo.Build `Test chip8::video::test::poke_byte`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test computer::test`.executor": "Run", &quot;Cargo.Build `Test computer::test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test instructions::test (1)`.executor": "Run", &quot;Cargo.Build `Test instructions::test (1)`.executor&quot;: &quot;Run&quot;,
"Cargo.Build `Test instructions::test`.executor": "Run", &quot;Cargo.Build `Test instructions::test`.executor&quot;: &quot;Run&quot;,
"Cargo.Build gemma.executor": "Run", &quot;Cargo.Build gemma.executor&quot;: &quot;Run&quot;,
"Cargo.Run emmagui.executor": "Run", &quot;Cargo.Run emmagui.executor&quot;: &quot;Run&quot;,
"Cargo.Run gemmaegui.executor": "Run", &quot;Cargo.Run gemmaegui.executor&quot;: &quot;Run&quot;,
"Cargo.Run gemmaegui_viewer.executor": "Debug", &quot;Cargo.Run gemmaegui_viewer.executor&quot;: &quot;Debug&quot;,
"Cargo.Run gemmaimgui.executor": "Run", &quot;Cargo.Run gemmaimgui.executor&quot;: &quot;Run&quot;,
"Cargo.Run trevors_chip8_toy.executor": "Debug", &quot;Cargo.Run trevors_chip8_toy.executor&quot;: &quot;Debug&quot;,
"Cargo.Test chip8::computer::test::cls_test.executor": "Run", &quot;Cargo.Test chip8::computer::test::cls_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::computer::test::decoder_test_valid_instructions.executor": "Run", &quot;Cargo.Test chip8::computer::test::decoder_test_valid_instructions.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::LdStVx_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::LdStVx_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::LdVxDt_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::LdVxDt_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::LdiAddr_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::LdiAddr_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::RndVxByte_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::RndVxByte_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::ShrVxVy_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::ShrVxVy_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::SneVxVy_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::SneVxVy_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::decoder_test_invalid_instructions.executor": "Run", &quot;Cargo.Test chip8::instructions::test::decoder_test_invalid_instructions.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::draw_nibble_vx_vy_n_test.executor": "Debug", &quot;Cargo.Test chip8::instructions::test::draw_nibble_vx_vy_n_test.executor&quot;: &quot;Debug&quot;,
"Cargo.Test chip8::instructions::test::encode_decode_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::encode_decode_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::random_produces_different_numbers.executor": "Run", &quot;Cargo.Test chip8::instructions::test::random_produces_different_numbers.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::series4000_corex_tests.executor": "Run", &quot;Cargo.Test chip8::instructions::test::series4000_corex_tests.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::series8xy4_corex_tests.executor": "Run", &quot;Cargo.Test chip8::instructions::test::series8xy4_corex_tests.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::series8xy6_corex_tests.executor": "Run", &quot;Cargo.Test chip8::instructions::test::series8xy6_corex_tests.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::shl_vx_vy_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::shl_vx_vy_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::instructions::test::subn_vx_vy_test.executor": "Run", &quot;Cargo.Test chip8::instructions::test::subn_vx_vy_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::util::test::bool_to_byte_changes.executor": "Run", &quot;Cargo.Test chip8::util::test::bool_to_byte_changes.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::util::test::byte_to_bool_changes.executor": "Run", &quot;Cargo.Test chip8::util::test::byte_to_bool_changes.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::util::test::ubln.executor": "Run", &quot;Cargo.Test chip8::util::test::ubln.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::video::test::poke_byte.executor": "Run", &quot;Cargo.Test chip8::video::test::poke_byte.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::video::test::poke_byte_test.executor": "Run", &quot;Cargo.Test chip8::video::test::poke_byte_test.executor&quot;: &quot;Run&quot;,
"Cargo.Test chip8::video::test::poke_sprite_test.executor": "Debug", &quot;Cargo.Test chip8::video::test::poke_sprite_test.executor&quot;: &quot;Debug&quot;,
"Cargo.Test computer::test.executor": "Debug", &quot;Cargo.Test computer::test.executor&quot;: &quot;Debug&quot;,
"Cargo.Test instructions::test (1).executor": "Debug", &quot;Cargo.Test instructions::test (1).executor&quot;: &quot;Debug&quot;,
"Cargo.Test instructions::test.executor": "Debug", &quot;Cargo.Test instructions::test.executor&quot;: &quot;Debug&quot;,
"Cargo.Test sound_timer::test.executor": "Run", &quot;Cargo.Test sound_timer::test.executor&quot;: &quot;Run&quot;,
"Cargo.Test util::test.executor": "Run", &quot;Cargo.Test util::test.executor&quot;: &quot;Run&quot;,
"Cargo.Test video::test.executor": "Coverage", &quot;Cargo.Test video::test.executor&quot;: &quot;Coverage&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.rust.reset.selective.auto.import": "true", &quot;RunOnceActivity.rust.reset.selective.auto.import&quot;: &quot;true&quot;,
"git-widget-placeholder": "master", &quot;git-widget-placeholder&quot;: &quot;rename__instructions&quot;,
"last_opened_file_path": "/home/tmerritt/Projects/chip8_toy/gemmaimgui", &quot;last_opened_file_path&quot;: &quot;/home/tmerritt/Projects/chip8_toy/gemmaimgui&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", &quot;org.rust.cargo.project.model.PROJECT_DISCOVERY&quot;: &quot;true&quot;,
"org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", &quot;org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon&quot;: &quot;&quot;,
"org.rust.first.attach.projects": "true", &quot;org.rust.first.attach.projects&quot;: &quot;true&quot;,
"settings.editor.selected.configurable": "language.rust.build.tool.cargo" &quot;settings.editor.selected.configurable&quot;: &quot;language.rust.build.tool.cargo&quot;
}, },
"keyToStringList": { &quot;keyToStringList&quot;: {
"com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ &quot;com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File&quot;: [
"TEXT" &quot;TEXT&quot;
] ]
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/gemmaimgui" /> <recent name="$PROJECT_DIR$/gemmaimgui" />
@ -230,6 +233,8 @@
<workItem from="1728672277369" duration="3861000" /> <workItem from="1728672277369" duration="3861000" />
<workItem from="1729266677612" duration="4335000" /> <workItem from="1729266677612" duration="4335000" />
<workItem from="1729274179500" duration="3149000" /> <workItem from="1729274179500" duration="3149000" />
<workItem from="1729353568282" duration="4624000" />
<workItem from="1729375372050" duration="3579000" />
</task> </task>
<servers /> <servers />
</component> </component>

File diff suppressed because it is too large Load Diff

View File

@ -15,3 +15,27 @@ pub const CHIP8_KEYBOARD: [[u8; 4]; 4] = [
pub const SCHIP_VIDEO_HEIGHT: i32 = 64; pub const SCHIP_VIDEO_HEIGHT: i32 = 64;
pub const SCHIP_VIDEO_WIDTH: i32 = 128; pub const SCHIP_VIDEO_WIDTH: i32 = 128;
pub const SCHIP_VIDE_MEMORY: usize = (SCHIP_VIDEO_HEIGHT * SCHIP_VIDEO_WIDTH) as usize; pub const SCHIP_VIDE_MEMORY: usize = (SCHIP_VIDEO_HEIGHT * SCHIP_VIDEO_WIDTH) as usize;
pub const INST_ADDI: &str = "ADDI";
pub const INST_ADD: &str = "ADD";
pub const INST_ADDR: &str = "ADDR";
pub const INST_AND: &str = "AND";
pub const INST_CLS: &str = "CLS";
pub const INST_CALL: &str = "CALL";
pub const INST_DRW: &str = "DRW";
pub const INST_EXIT: &str = "EXIT";
pub const INST_JPA: &str = "JPA";
pub const INST_JPI: &str = "JPI";
pub const INST_BCD: &str = "BCD";
pub const INST_LDD: &str = "LDD";
pub const INST_LDF: &str = "LDF";
pub const INST_LDF2: &str = "LDF2";
pub const INST_LDIA: &str = "LDIA";
pub const INST_LDIX: &str = "LDIX";
pub const INST_LIDR: &str = "LIDR";
pub const INST_LIDS: &str = "LIDS";
pub const INST_LDR: &str = "LDR";
pub const INST_LDRD: &str = "LDRD";
pub const INST_LDRI: &str = "LDRI";
pub const INST_LDRK: &str = "LDRK";
pub const INST_LDRY: &str = "LDRY";

View File

@ -52,8 +52,8 @@ fn main() -> eframe::Result {
ui.label("display of file here"); ui.label("display of file here");
ui.vertical(|ui| { ui.vertical(|ui| {
display_instruction(0x010, &Chip8CpuInstructions::AddIVx(0x01), ui); display_instruction(0x010, &Chip8CpuInstructions::ADDI(0x01), ui);
display_instruction(0x012, &Chip8CpuInstructions::RndVxByte(0x01, 0x02), ui); display_instruction(0x012, &Chip8CpuInstructions::RND(0x01, 0x02), ui);
}); });
ui.text_edit_multiline(&mut edit_space); ui.text_edit_multiline(&mut edit_space);
}); });

View File

@ -1,5 +1,9 @@
use std::fs::File;
use std::io;
use std::io::BufRead;
use std::path::Path; use std::path::Path;
use clap::Parser; use clap::Parser;
use gemma::chip8::instructions::Chip8CpuInstructions;
/// Ch8Asm /// Ch8Asm
/// Converts well formed CH8ASM. /// Converts well formed CH8ASM.
@ -10,19 +14,7 @@ use clap::Parser;
pub struct Assembler {} pub struct Assembler {}
impl Assembler { impl Assembler {
pub fn instruction_to_string() -> String {
// Format the output as
// IST [P0] [P1] [P2] ; XXXX
// IST = 3 letter instruction code
// P0-2 = Parameters to Instruction
// XXXX = Hex representation of data
// ** OR **
// DW XXXX ;
// DW = DATAWORD
// XXXX = HEX OF DATA
String::new()
}
} }
#[derive(Parser)] #[derive(Parser)]
@ -30,8 +22,6 @@ impl Assembler {
struct AssemblerApp { struct AssemblerApp {
#[arg(short)] #[arg(short)]
input_file: Box<Path>, input_file: Box<Path>,
#[arg(short)]
output_file: Option<Path>
} }
fn main() { fn main() {
@ -39,6 +29,31 @@ fn main() {
let result = AssemblerApp::parse(); let result = AssemblerApp::parse();
println!("Preparing to assemble {}", result.input_file.file_name()); let mut assembled_code: Vec<u8> = vec![];
// println!("Preparing to assemble {}", result.input_file.file_name());
let path = Path::new(result.input_file);
// Open the file in read-only mode
let file = File::open(&path)?;
// Use a buffered reader for efficient reading
let reader = io::BufReader::new(file);
// Read the file line by line
for line in reader.lines() {
// Get the line, handling possible errors
let line = line?;
// Split the line by ';' and collect parts into a vector
let parts: Vec<&str> = line.split(';').collect();
// Print each part or process it as needed
for part in &parts {
println!("{}", part);
}
}
// read the line split by a semicolon
} }

View File

@ -6,14 +6,13 @@ use gemma::chip8::instructions::Chip8CpuInstructions::XXXXERRORINSTRUCTION;
/// ch8disasm /// ch8disasm
/// ///
/// Provide disassembled version of the CH8 file provided. /// Provide disassembled version of the CH8 file provided.
#[derive(Parser)] #[derive(Parser)]
#[command(version, about, long_about = None)] #[command(version, about, long_about = None)]
struct DisassemblerApp { struct DisassemblerApp {
#[arg(short)] #[arg(short)]
input_file: Box<Path>, input_file: Box<Path>,
#[arg(short)] #[arg(short)]
output_file: Option<Box<Path>> output_file: Option<Box<Path>>,
} }
fn main() { fn main() {
@ -27,26 +26,25 @@ fn main() {
// read the input file and loop through it byte by byte. // read the input file and loop through it byte by byte.
for (offset, byte) in std::fs::read(result.input_file).unwrap().iter().enumerate() { for (offset, byte) in std::fs::read(result.input_file).unwrap().iter().enumerate() {
working_instruction = (working_instruction << 8) | (*byte as u16); working_instruction = (working_instruction << 8) | (*byte as u16);
if offset % 2 != 0 { if offset % 2 != 0 {
// println!("ODD BYTE -> {:02x} / WORKING: {working_instruction:04x}", *byte as u16); let decoded = Chip8CpuInstructions::decode(working_instruction);
let decoded = Chip8CpuInstructions::decode(working_instruction); match decoded {
match decoded { XXXXERRORINSTRUCTION => {
XXXXERRORINSTRUCTION => { println!("DW 0x{working_instruction:04x}{:>16}; {working_instruction:04x}", " ");
println!("\t\t; ERROR: BYTES: {} OFFSET: {}", working_instruction, offset); }
println!("FOUND ERROR INSTRUCTION. LIKELY DATA."); Chip8CpuInstructions::JPA(x) => {
} if (offset + 0x200) == x as usize {
Chip8CpuInstructions::JpAddr(x) => { println!("INFINITE LOOP")
if (offset + 0x200) == x as usize {
println!("INFINITE LOOP")
}
}
_ => {
println!("{}\t\t; Bytes [{:04x}] ending offset [{:04x}]", decoded, working_instruction, offset);
} }
} }
working_instruction = 0x0000; _ => {
let fill_len = 25 - decoded.to_string().len();
println!("{}{:<fill_len$}; Bytes [{:04x}] offset [{:04x}]", decoded, " ", working_instruction, offset - 1);
}
} }
working_instruction = 0x0000;
}
} }
match result.output_file { match result.output_file {
@ -57,4 +55,4 @@ fn main() {
println!("Output to {:?}", target); println!("Output to {:?}", target);
} }
} }
} }

View File

@ -1,38 +1,130 @@
cls ; 00e0 CLS ; 00E0
ldx 0x01, 0x60 ; 6160 LDX 0X01, 0X60 ; 6160
ldx 0x00, 0x08 ; 6008 LDX 0X00, 0X08 ; 6008
ldi 0x250 ; a250 LDI 0X250 ; A250
drw 0x00, 0x01, 0x0f ; d01f DRW 0X00, 0X01, 0X0F ; D01F
ldx 0x00, 0x10 ; 6010 LDX 0X00, 0X10 ; 6010
ldi 0x25f ; a25f LDI 0X25F ; A25F
drw 0x00, 0x01, 0x0f ; d01f DRW 0X00, 0X01, 0X0F ; D01F
ldx 0x00, 0x18 ; 6018 LDX 0X00, 0X18 ; 6018
ldi 0x26e ; a26e LDI 0X26E ; A26E
ldx 0x00, 0x1f ; d01f LDX 0X00, 0X1F ; D01F
ldx 0x00, 0x20 ; 6020 LDX 0X00, 0X20 ; 6020
ldi 0x27d ; a27d LDI 0X27D ; A27D
drw 0x00, 0x01, 0x0f ; d01f DRW 0X00, 0X01, 0X0F ; D01F
ldx 0x00, 0x28 ; 6028 LDX 0X00, 0X28 ; 6028
ldi 0x28c ; a28c LDI 0X28C ; A28C
; d01f DRW 0X00, 0X01, 0X0F ; D01F
; 6030 LDX 0X00, 0X30 ; 6030
; a29b LDI 0X29B ; A29B
; d01f DRW 0X00, 0X01, 0X0F ; D01F
; 6110 LDX 0X01, 0X10 ; 6110
; 6008 LDX 0X00, 0X08 ; 6008
; a2aa LDI 0X2AA ; A2AA
; d01f DRW 0X00, 0X01, 0X0F ; D01F
; 6010 a2b9 d01f 6018 a2c8 d01f 6020 a2d7 LDX 0X00, 0X10 ; 6010
; d01f 6028 a2e6 d01f 6030 a2f5 d01f 124e LDX 0X2B9 ; A2B9
; 0f02 0202 0202 0000 1f3f 71e0 e5e0 e8a0 DRW 0X00, 0X01, 0X0F ; D01F
; 0d2a 2828 2800 0018 b8b8 3838 3fbf 0019 LDX 0X00, 0X18 ; 6018
; a5bd a19d 0000 0c1d 1d01 0d1d 9d01 c729 LDI 0X2C8 ; A2C8
; 2929 2700 00f8 fcce c6c6 c6c6 0049 4a49 DRW 0X00, 0X01, 0X0F ; D01F
; 483b 0000 0001 0303 0301 f030 9000 0080 LDX 0X00, 0X20 ; 6020
; 0000 00fe c783 8383 c6fc e7e0 e0e0 e071 LDI 2D7 ; A2D7
; 3f1f 0000 0702 0202 0239 3838 3838 b8b8 DRW 0X00, 0X01, 0X0F ; D01F
; 3800 0031 4a79 403b dddd dddd dddd dddd LDX 0X00, 0X28 ; 6028
; 0000 a038 20a0 18ce fcf8 c0d4 dcc4 c500 LDI 0X2E6 ; A2E6
; 0030 4424 1463 f103 0707 7717 6371 0000 DRW 0X00, 0X01, 0X0F ; D01F
; 288e a8a8 a6ce 8703 0303 87fe fc00 0060 LDX 0X00, 0X30 ; 6030
; 90f0 8070 LDX 0X2F5 ; A2F5
DRW 0X00, 0X01, 0X0F ; D01F
JMP 0X24E ; 124E
DW 0X0F02 ; 0F02
DW 0X0202 ; 0202
DW 0X0202 ; 0202
DW 0X0000 ; 0000
DW 0X1F3F ; 1F3F
DW 0X71E0 ; 71E0
DW 0XE5E0 ; E5E0
DW 0XE8A0 ; E8A0
DW 0X0D2A ; 0D2A
DW 0X2828 ; 2828
DW 0X2800 ; 2800
DW 0X0018 ; 0018
DW 0XB8B8 ; B8B8
DW 0X3838 ; 3838
DW 0X3FBF ; 3FBF
DW 0X0019 ; 0019
DW 0XA5BD ; A5BD
DW 0XA19D ; A19D
DW 0X0000 ; 0000
DW 0X0C1D ; 0C1D
DW 0X1D01 ; 1D01
DW 0X0D1D ; 0D1D
DW 0X9D01 ; 9D01
DW 0XC729 ; C729
DW 0X2929 ; 2929
DW 0X2700 ; 2700
DW 0X00F8 ; 00F8
DW 0XFCCE ; FCCE
DW 0XC6C6 ; C6C6
DW 0XC6C6 ; C6C6
DW 0X0049 ; 0049
DW 0X4A49 ; 4A49
DW 0X483B ; 483B
DW 0X0000 ; 0000
DW 0X0001 ; 0001
DW 0X0303 ; 0303
DW 0X0301 ; 0301
DW 0XF030 ; F030
DW 0X9000 ; 9000
DW 0X0080 ; 0080
DW 0X0000 ; 0000
DW 0X00FE ; 00FE
DW 0XC783 ; C783
DW 0X8383 ; 8383
DW 0XC6FC ; C6FC
DW 0XE7E0 ; E7E0
DW 0XE0E0 ; E0E0
DW 0XE071 ; E071
DW 0X3F1F ; 3F1F
DW 0X0000 ; 0000
DW 0X0702 ; 0702
DW 0X0202 ; 0202
DW 0X0239 ; 0239
DW 0X3838 ; 3838
DW 0X3838 ; 3838
DW 0XB8B8 ; B8B8
DW 0X3800 ; 3800
DW 0X0031 ; 0031
DW 0X4A79 ; 4A79
DW 0X403B ; 403B
DW 0XDDDD ; DDDD
DW 0XDDDD ; DDDD
DW 0XDDDD ; DDDD
DW 0XDDDD ; DDDD
DW 0X0000 ; 0000
DW 0XA038 ; A038
DW 0X20A0 ; 20A0
DW 0X18CE ; 18CE
DW 0XFCF8 ; FCF8
DW 0XC0D4 ; C0D4
DW 0XDCC4 ; DCC4
DW 0XC500 ; C500
DW 0X0030 ; 0030
DW 0X4424 ; 4424
DW 0X1463 ; 1463
DW 0XF103 ; F103
DW 0X0707 ; 0707
DW 0X7717 ; 7717
DW 0X6371 ; 6371
DW 0X0000 ; 0000
DW 0X288E ; 288E
DW 0XA8A8 ; A8A8
DW 0XA6CE ; A6CE
DW 0X8703 ; 8703
DW 0X0303 ; 0303
DW 0X87FE ; 87FE
DW 0XFC00 ; FC00
DW 0X0060 ; 0060
DW 0X90F0 ; 90F0
DW 0X8070 ; 8070