2022-03-16 17:17:32 +00:00
|
|
|
//
|
2022-11-17 05:39:46 +00:00
|
|
|
// 6502_dis.c
|
2022-03-16 17:17:32 +00:00
|
|
|
// A2Mac
|
|
|
|
//
|
|
|
|
// Created by Tamas Rudnai on 3/13/22.
|
|
|
|
// Copyright © 2022 GameAlloy. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
#define DISASSEMBLER
|
2022-08-27 02:59:14 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
#include "6502_dis.h"
|
|
|
|
#include "6502_instructions.h"
|
2022-10-27 04:11:45 +00:00
|
|
|
|
2022-04-16 04:09:09 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
INLINE int m6502_Disass_1_Instr(void) {
|
2022-03-16 17:17:32 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
_disNewInstruction();
|
2022-10-27 04:11:45 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
switch ( _fetch_dis() ) {
|
2024-01-05 15:56:03 +00:00
|
|
|
#include "6502_std.h" // Standard 6502 instructions
|
|
|
|
//#include "6502_und.h" // Undocumented 6502 instructions
|
|
|
|
#include "6502_C.h" // Extended 65C02 instructions
|
|
|
|
#include "6502_C_Rockwell.h" // Extended 65C02 instructions
|
2022-10-27 04:11:45 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
default:
|
|
|
|
dbgPrintf("%04X: Unimplemented Instruction 0x%02X\n", m6502.PC -1, _memread_dis( m6502.PC -1 ));
|
|
|
|
return 2;
|
|
|
|
} // switch fetch
|
2022-10-28 18:30:25 +00:00
|
|
|
|
2022-11-18 03:32:56 +00:00
|
|
|
return 2;
|
2022-10-27 04:11:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|