List of commands. More...
#include <md.h>
Classes | |
| struct | _carthead_ |
| struct | dgen_debugger_cmd |
| struct | patch_elem |
Public Types | |
| enum | z80_core { Z80_CORE_NONE, Z80_CORE_TOTAL } |
| enum | cpu_emu { CPU_EMU_NONE, CPU_EMU_TOTAL } |
Public Member Functions | |
| void | md_set (bool set) |
| unsigned int | vblank () |
| void | m68k_state_dump () |
| void | m68k_state_restore () |
| void | z80_state_dump () |
| void | z80_state_restore () |
| int | myfm_write (int a, int v, int md) |
| uint8_t | region_guess () |
| Region to emulate according to dgen_region_order and ROM header. | |
| int | one_frame (struct bmap *bm, unsigned char retpal[256], struct sndinfo *sndi) |
| void | pad_update () |
| int | okay () |
| md (bool pal, char region) | |
| MD constructor. | |
| ~md () | |
| void | init_pal () |
| Switch to PAL or NTSC. | |
| bool | init_sound () |
| Initialise sound. | |
| int | plug_in (unsigned char *cart, int len) |
| Plug a cart into the MD. | |
| int | unplug () |
| Unplug a cart from the system. | |
| int | load (const char *name) |
| Load a ROM. | |
| int | reset () |
| Resets everything (Z80, M68K, VDP, etc). | |
| uint8_t | misc_readbyte (uint32_t a) |
| Read a byte from the m68Ks ram. | |
| void | misc_writebyte (uint32_t a, uint8_t d) |
| write a byte to the m68Ks ram. | |
| uint16_t | misc_readword (uint32_t a) |
| Read a word from the m68k memory. | |
| void | misc_writeword (uint32_t a, uint16_t d) |
| Write a word to m68k memory. | |
| void | z80_init () |
| Initialise the Z80. | |
| void | z80_reset () |
| Reset the Z80. | |
| uint8_t | z80_read (uint16_t a) |
| Read one byte from the memory space. | |
| void | z80_write (uint16_t a, uint8_t d) |
| Write one byte to the memory. | |
| uint8_t | z80_port_read (uint16_t a) |
| Port read to Z80. | |
| void | z80_port_write (uint16_t a, uint8_t d) |
| Port write to z80 This is a Nop. | |
| void | cycle_z80 () |
| Cycle through Z80 CPU implementations. | |
| void | cycle_cpu () |
| Cycle between M68K CPU implementations. | |
| int | import_gst (FILE *hand) |
| int | export_gst (FILE *hand) |
| int | z80dump () |
| Dump Z80 ram to a file named "dgz80ram". | |
| void | fix_rom_checksum () |
| Replace the in-memory ROM checksum with a calculated checksum. | |
| int | patch (const char *list, unsigned int *errors, unsigned int *applied, unsigned int *reverted) |
| This takes a comma or whitespace-separated list of Game Genie and/or hex codes to patch the ROM with. | |
| int | has_save_ram () |
| int | get_save_ram (FILE *from) |
| Get saveram from FILE*. | |
| int | put_save_ram (FILE *into) |
| Write a saveram to FILE*. | |
| void | init_joysticks () |
| void | deinit_joysticks () |
| int | debug_despatch_cmd (int n_toks, char **args) |
| Dispatch a command to the relevant handler method. | |
| int | debug_cmd_cont (int n_args, char **args) |
| Continue (cont) command handler. | |
| int | debug_cmd_reg (int n_args, char **args) |
| Dump registers (reg) command handler. | |
| int | debug_cmd_help (int n_args, char **args) |
| Help (help) command handler. | |
| int | debug_cmd_break (int n_args, char **args) |
| Breakpoint (break) command handler. | |
| int | debug_cmd_quit (int n_args, char **args) |
| Quit (quit) command handler. | |
| int | debug_cmd_step (int n_args, char **args) |
| Step (step) command handler for the current core. | |
| int | debug_cmd_trace (int n_args, char **args) |
| Trace toggle (trace) command handler. | |
| int | debug_cmd_minus_break (int n_args, char **args) |
| Breakpoint removal (-break) command handler. | |
| int | debug_cmd_cpu (int n_args, char **args) |
| Core/CPU selection (cpu) command. | |
| int | debug_cmd_dis (int n_args, char **args) |
| Disassemble (dis) command handler. | |
| int | debug_cmd_mem (int n_args, char **args) |
| Memory dump (mem) command handler. | |
| int | debug_cmd_setbwlr (int n_args, char **args, unsigned int type) |
| Memory/registers write (setb/setw/setl/setr) commands handler. | |
| int | debug_cmd_setb (int n_args, char **args) |
| Set byte (setb) command handler, see debug_cmd_setbwlr(). | |
| int | debug_cmd_setw (int n_args, char **args) |
| Set word (setw) command handler, see debug_cmd_setbwlr(). | |
| int | debug_cmd_setl (int n_args, char **args) |
| Set long word (setl) command handler, see debug_cmd_setbwlr(). | |
| int | debug_cmd_setr (int n_args, char **args) |
| Set register (setr) command handler, see debug_cmd_setbwlr(). | |
| int | debug_cmd_count (int n_args, char **args) |
| Instructions counters toggle (count) command handler. | |
| int | debug_cmd_watch (int n_args, char **args) |
| Watchpoints (watch) command handler. | |
| int | debug_cmd_minus_watch (int n_args, char **args) |
| Watchpoint removal (-watch) command handler. | |
| int | debug_enter (void) |
| Enter debugger and show command prompt. | |
| void | debug_leave (void) |
| Leave debugger. | |
| void | debug_update_m68k_wp_cache (struct dgen_wp *w) |
| Update the data pointer of a single M68K watchpoint. | |
| void | debug_update_z80_wp_cache (struct dgen_wp *w) |
| Update the data pointer of a single Z80 watchpoint. | |
| void | debug_update_fired_m68k_wps (void) |
| Resynchronise all M68K watchpoints based on actual data. | |
| void | debug_update_fired_z80_wps (void) |
| Resynchronise all Z80 watchpoints based on actual data. | |
| void | debug_set_wp_m68k (uint32_t start_addr, uint32_t end_addr) |
| Add a M68K watchpoint to a range of addresses. | |
| void | debug_set_wp_z80 (uint16_t start_addr, uint16_t end_addr) |
| Add a Z80 watchpoint to a range of addresses. | |
| void | debug_print_m68k_disassemble (uint32_t from, int len) |
| Pretty print a M68K disassembly. | |
| void | debug_print_z80_disassemble (uint16_t, unsigned int) |
| Pretty print a Z80 disassembly. | |
| void | debug_show_m68k_regs (void) |
| Pretty print the M68K registers using m68k_state from class md. | |
| void | debug_show_z80_regs (void) |
| Pretty print Z80 registers using z80_state from class md. | |
| void | debug_dump_mem (uint32_t addr, uint32_t len) |
| Pretty print a block of memory as a hex dump. | |
Static Public Member Functions | |
| static void | region_info (uint8_t region, int *pal, int *hz, int *vblank, int *lines, uint8_t *mem) |
Public Attributes | |
| unsigned int | mclk |
| unsigned int | clk0 |
| unsigned int | clk1 |
| unsigned int | lines |
| unsigned int | vhz |
| unsigned int | pal: 1 |
| md_vdp | vdp |
| m68k_state_t | m68k_state |
| z80_state_t | z80_state |
| struct md::_carthead_ | cart_head |
| char | region |
| int | pad [2] |
| uint8_t | pad_com [2] |
| unsigned char | coo4 |
| unsigned char | coo5 |
| bool | plugged |
| enum md::z80_core | z80_core |
| enum md::cpu_emu | cpu_emu |
| char | romname [256] |
| struct md::patch_elem * | patch_elem |
| bool | debug_trap |
| int | m68k |
| int | m68k_max |
| int | z80 |
| int | z80_max |
Static Public Attributes | |
| static const uint8_t | no_rom [] |
| This is the default ROM, used when nothing is loaded. | |
| static const size_t | no_rom_size = sizeof(no_rom) |
| static const struct md::dgen_debugger_cmd | debug_cmd_list [] |
Private Member Functions | |
| unsigned char | calculate_coo8 () |
| unsigned char | calculate_coo9 () |
| int | may_want_to_get_pic (struct bmap *bm, unsigned char retpal[256], int mark) |
| int | may_want_to_get_sound (struct sndinfo *sndi) |
| unsigned int | m68k_read_pc () |
| int | m68k_odo () |
| void | m68k_run () |
| void | m68k_busreq_request () |
| void | m68k_busreq_cancel () |
| void | m68k_irq (int i) |
| void | m68k_vdp_irq_trigger () |
| void | m68k_vdp_irq_handler () |
| int | z80_odo () |
| void | z80_run () |
| void | z80_sync (int fake) |
| void | z80_irq (int vector) |
| void | z80_irq_clear () |
| unsigned int | frame_usecs () |
| int | fm_timer_callback () |
| int | myfm_read (int a) |
| int | mysn_write (int v) |
| void | fm_reset () |
| void | dac_init () |
| void | dac_submit (uint8_t d) |
| void | dac_enable (uint8_t d) |
| uint8_t | m68k_ROM_read (uint32_t a) |
| uint8_t | m68k_IO_read (uint32_t a) |
| uint8_t | m68k_VDP_read (uint32_t a) |
| void | m68k_ROM_write (uint32_t, uint8_t) |
| void | m68k_IO_write (uint32_t, uint8_t) |
| bool | debug_is_m68k_bp_set () |
| Check if at least one M68K breakpoint is set. | |
| bool | debug_is_m68k_wp_set () |
| Check if at least one M68K watchpoint is set. | |
| int | debug_next_free_wp_m68k () |
| Get the ID of the next free M68K watchpoint. | |
| int | debug_next_free_bp_m68k () |
| Get the ID of the next free M68K breakpoint. | |
| bool | debug_is_z80_bp_set () |
| Check if at least one Z80 breakpoint is set. | |
| bool | debug_is_z80_wp_set () |
| Check if at least one Z80 watchpoint is set. | |
| int | debug_next_free_wp_z80 () |
| Get the ID of the next free Z80 watchpoint. | |
| int | debug_next_free_bp_z80 () |
| Get the ID of the next free Z80 breakpoint. | |
| void | debug_init () |
| Initialise the debugger. | |
| int | debug_find_bp_m68k (uint32_t) |
| Find the index of a M68K breakpoint. | |
| int | debug_find_wp_m68k (uint32_t) |
| Find the index of a M68K watchpoint by its start address. | |
| void | debug_print_m68k_wp (int) |
| Print a M68K watchpoint in a human-readable form. | |
| int | debug_should_m68k_wp_fire (struct dgen_wp *w) |
| Check the given M68K watchpoint against cached memory to see if it should fire. | |
| int | debug_find_bp_z80 (uint16_t) |
| Find the index of a Z80 breakpoint. | |
| int | debug_find_wp_z80 (uint16_t) |
| Find the index of a Z80 watchpoint by its start address. | |
| void | debug_print_z80_wp (int) |
| Print a Z80 watchpoint in a human-readable form. | |
| int | debug_should_z80_wp_fire (struct dgen_wp *w) |
| Check the given Z80 watchpoint against cached memory to see if it should fire. | |
| uint32_t | m68k_get_pc () |
| Get M68K PC. | |
| uint16_t | z80_get_pc () |
| Get Z80 PC. | |
| bool | debug_m68k_check_bps () |
| Breakpoint handler fired before every M68K instruction. | |
| bool | debug_m68k_check_wps () |
| Watchpoint handler fired after every M68K instruction. | |
| bool | debug_z80_check_bps () |
| Breakpoint handler fired before every Z80 instruction. | |
| bool | debug_z80_check_wps () |
| Watchpoint handler fired after every Z80 instruction. | |
| void | debug_rm_bp_m68k (int) |
| Remove a M68K breakpoint. | |
| void | debug_rm_wp_m68k (int) |
| Remove a M68K watchpoint. | |
| void | debug_rm_bp_z80 (int) |
| Remove a Z80 breakpoint. | |
| void | debug_rm_wp_z80 (int) |
| Remove a Z80 watchpoint. | |
| void | debug_list_bps_m68k () |
| Pretty print M68K breakpoints. | |
| void | debug_list_wps_m68k () |
| Pretty print M68K watchpoints. | |
| void | debug_list_bps_z80 () |
| Pretty print Z80 breakpoints. | |
| void | debug_list_wps_z80 () |
| Pretty print Z80 watchpoints. | |
| int | debug_set_bp_m68k (uint32_t) |
| Add a M68K breakpoint. | |
| int | debug_set_bp_z80 (uint16_t) |
| Add a Z80 breakpoint. | |
Static Private Attributes | |
| static bool | lock = false |
List of commands.
| enum md::cpu_emu |
| enum md::z80_core |
| md::md | ( | bool | pal, |
| char | region | ||
| ) |
MD constructor.
| pal | True if we are running the MD in PAL mode. |
| region | Region to emulate ('J', 'U', or 'E'). |
| md::~md | ( | ) |
|
private |
|
private |
| void md::cycle_cpu | ( | ) |
Cycle between M68K CPU implementations.
| void md::cycle_z80 | ( | ) |
Cycle through Z80 CPU implementations.
|
private |
|
private |
|
private |
| int md::debug_cmd_break | ( | int | n_args, |
| char ** | args | ||
| ) |
Breakpoint (break) command handler.
| n_args | Number of arguments. | |
| [in] | args | List of arguments. |
| int md::debug_cmd_cont | ( | int | n_args, |
| char ** | args | ||
| ) |
Continue (cont) command handler.
This command drops out of debug mode.
| n_args | Number of arguments (ignored). |
| args | Arguments (ignored). |
| int md::debug_cmd_count | ( | int | n_args, |
| char ** | args | ||
| ) |
Instructions counters toggle (count) command handler.
| n_args | Number of arguments. |
| args | Arguments. |
| int md::debug_cmd_cpu | ( | int | n_args, |
| char ** | args | ||
| ) |
Core/CPU selection (cpu) command.
Switch to the core/CPU given in args[0].
| n_args | Number of arguments (should always be 1). |
| args | List of arguments. |
| int md::debug_cmd_dis | ( | int | n_args, |
| char ** | args | ||
| ) |
Disassemble (dis) command handler.
| n_args | Number of arguments. | |
| [in] | args | Arguments list. |
| int md::debug_cmd_help | ( | int | n_args, |
| char ** | args | ||
| ) |
Help (help) command handler.
| n_args | Number of arguments (ignored). |
| args | List of arguments (ignored). |
| int md::debug_cmd_mem | ( | int | n_args, |
| char ** | args | ||
| ) |
Memory dump (mem) command handler.
| n_args | Number of arguments. |
| args | Arguments, see above. |
| int md::debug_cmd_minus_break | ( | int | n_args, |
| char ** | args | ||
| ) |
Breakpoint removal (-break) command handler.
If args[0] starts with a #, remove a breakpoint by ID. Otherwise, remove it by address.
| n_args | Number of arguments (always 1). |
| args | List of arguments. |
| int md::debug_cmd_minus_watch | ( | int | n_args, |
| char ** | args | ||
| ) |
Watchpoint removal (-watch) command handler.
If args[0] starts with a #, remove a watchpoint by ID. Otherwise, remove it by address.
| n_args | Number of arguments (always 1). | |
| [in] | args | List of arguments. |
| int md::debug_cmd_quit | ( | int | n_args, |
| char ** | args | ||
| ) |
Quit (quit) command handler.
This command makes DGen/SDL quit.
| n_args | Number of arguments (ignored). |
| args | List of arguments (ignored). |
| int md::debug_cmd_reg | ( | int | n_args, |
| char ** | args | ||
| ) |
Dump registers (reg) command handler.
This command pretty prints registers for the current context.
| n_args | Number of arguments (ignored). | |
| [in] | args | List of arguments (ignored). |
| int md::debug_cmd_setb | ( | int | n_args, |
| char ** | args | ||
| ) |
Set byte (setb) command handler, see debug_cmd_setbwlr().
| int md::debug_cmd_setbwlr | ( | int | n_args, |
| char ** | args, | ||
| unsigned int | type | ||
| ) |
Memory/registers write (setb/setw/setl/setr) commands handler.
| n_args | Number of arguments (ignored, always 2). |
| args | Arguments, see above. |
| type | Data type to write, see above. |
| int md::debug_cmd_setl | ( | int | n_args, |
| char ** | args | ||
| ) |
Set long word (setl) command handler, see debug_cmd_setbwlr().
| int md::debug_cmd_setr | ( | int | n_args, |
| char ** | args | ||
| ) |
Set register (setr) command handler, see debug_cmd_setbwlr().
| int md::debug_cmd_setw | ( | int | n_args, |
| char ** | args | ||
| ) |
Set word (setw) command handler, see debug_cmd_setbwlr().
| int md::debug_cmd_step | ( | int | n_args, |
| char ** | args | ||
| ) |
Step (step) command handler for the current core.
| n_args | Number of arguments. |
| args | List of arguments. |
| int md::debug_cmd_trace | ( | int | n_args, |
| char ** | args | ||
| ) |
Trace toggle (trace) command handler.
| n_args | Number of arguments. |
| args | Arguments. |
| int md::debug_cmd_watch | ( | int | n_args, |
| char ** | args | ||
| ) |
Watchpoints (watch) command handler.
| n_args | Number of arguments. |
| args | Arguments, see above. |
| int md::debug_despatch_cmd | ( | int | n_toks, |
| char ** | toks | ||
| ) |
Dispatch a command to the relevant handler method.
| n_toks | Number of tokens (arguments). |
| toks | List of tokens (arguments). |
| void md::debug_dump_mem | ( | uint32_t | addr, |
| uint32_t | len | ||
| ) |
Pretty print a block of memory as a hex dump.
| addr | Start address. |
| len | Length (in bytes) to dump. |
| int md::debug_enter | ( | void | ) |
Enter debugger and show command prompt.
|
private |
Find the index of a M68K breakpoint.
| addr | Address to look for. |
|
private |
Find the index of a Z80 breakpoint.
| addr | Address to look for. |
|
private |
Find the index of a M68K watchpoint by its start address.
| addr | Address to look for. |
|
private |
Find the index of a Z80 watchpoint by its start address.
| addr | Address to look for. |
|
private |
Initialise the debugger.
All breakpoints are disabled by default.
|
private |
Check if at least one M68K breakpoint is set.
|
private |
Check if at least one M68K watchpoint is set.
|
private |
Check if at least one Z80 breakpoint is set.
|
private |
Check if at least one Z80 watchpoint is set.
| void md::debug_leave | ( | void | ) |
Leave debugger.
|
private |
Pretty print M68K breakpoints.
|
private |
Pretty print Z80 breakpoints.
|
private |
Pretty print M68K watchpoints.
|
private |
Pretty print Z80 watchpoints.
|
private |
Breakpoint handler fired before every M68K instruction.
|
private |
Watchpoint handler fired after every M68K instruction.
|
private |
Get the ID of the next free M68K breakpoint.
|
private |
Get the ID of the next free Z80 breakpoint.
|
private |
Get the ID of the next free M68K watchpoint.
|
private |
Get the ID of the next free Z80 watchpoint.
| void md::debug_print_m68k_disassemble | ( | uint32_t | from, |
| int | len | ||
| ) |
Pretty print a M68K disassembly.
| from | Address to start disassembling from. |
| len | Number of instructions to disassemble. |
|
private |
Print a M68K watchpoint in a human-readable form.
| idx | Index of watchpoint to print. |
| void md::debug_print_z80_disassemble | ( | uint16_t | from, |
| unsigned int | num | ||
| ) |
Pretty print a Z80 disassembly.
| from | Address to start disassembling from. |
| num | Number of instructions to disassemble. |
|
private |
Print a Z80 watchpoint in a human-readable form.
| idx | Index of watchpoint to print. |
|
private |
Remove a M68K breakpoint.
| index | Index of breakpoint to remove. |
|
private |
Remove a Z80 breakpoint.
| index | Index of breakpoint to remove. |
|
private |
Remove a M68K watchpoint.
| index | Index of watchpoint to remove. |
|
private |
Remove a Z80 watchpoint.
| index | Index of watchpoint to remove. |
|
private |
Add a M68K breakpoint.
| addr | Address to break on. |
|
private |
Add a Z80 breakpoint.
| addr | Address to break on. |
| void md::debug_set_wp_m68k | ( | uint32_t | start_addr, |
| uint32_t | end_addr | ||
| ) |
Add a M68K watchpoint to a range of addresses.
| start_addr | Start address of watchpoint range. |
| end_addr | End address of watchpoint range. |
| void md::debug_set_wp_z80 | ( | uint16_t | start_addr, |
| uint16_t | end_addr | ||
| ) |
Add a Z80 watchpoint to a range of addresses.
| start_addr | Start address of watchpoint range. |
| end_addr | End address of watchpoint range. |
|
private |
Check the given M68K watchpoint against cached memory to see if it should fire.
| [in] | w | Watch point to check. |
|
private |
Check the given Z80 watchpoint against cached memory to see if it should fire.
| [in] | w | Watch point to check. |
| void md::debug_show_m68k_regs | ( | void | ) |
Pretty print the M68K registers using m68k_state from class md.
| void md::debug_show_z80_regs | ( | void | ) |
Pretty print Z80 registers using z80_state from class md.
| void md::debug_update_fired_m68k_wps | ( | void | ) |
Resynchronise all M68K watchpoints based on actual data.
| void md::debug_update_fired_z80_wps | ( | void | ) |
Resynchronise all Z80 watchpoints based on actual data.
| void md::debug_update_m68k_wp_cache | ( | struct dgen_wp * | w | ) |
Update the data pointer of a single M68K watchpoint.
| w | Watchpoint to update. |
| void md::debug_update_z80_wp_cache | ( | struct dgen_wp * | w | ) |
Update the data pointer of a single Z80 watchpoint.
| w | Watchpoint to update. |
|
private |
Breakpoint handler fired before every Z80 instruction.
|
private |
Watchpoint handler fired after every Z80 instruction.
| void md::deinit_joysticks | ( | ) |
| int md::export_gst | ( | FILE * | hand | ) |
| void md::fix_rom_checksum | ( | ) |
Replace the in-memory ROM checksum with a calculated checksum.
|
private |
|
private |
|
private |
| int md::get_save_ram | ( | FILE * | from | ) |
Get saveram from FILE*.
| from | File to read from. |
|
inline |
| int md::import_gst | ( | FILE * | hand | ) |
| void md::init_joysticks | ( | ) |
| void md::init_pal | ( | ) |
Switch to PAL or NTSC.
This method's name is a bit misleading. This switches to PAL or not depending on "md::pal".
| bool md::init_sound | ( | ) |
Initialise sound.
| int md::load | ( | const char * | name | ) |
Load a ROM.
| [in] | name | File name of cart to load. |
|
private |
|
private |
|
private |
Get M68K PC.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void md::m68k_state_dump | ( | ) |
| void md::m68k_state_restore | ( | ) |
|
private |
|
private |
|
private |
|
inlineprivate |
|
private |
| void md::md_set | ( | bool | set | ) |
| uint8_t md::misc_readbyte | ( | uint32_t | a | ) |
Read a byte from the m68Ks ram.
| a | Address to read. |
| uint16_t md::misc_readword | ( | uint32_t | a | ) |
Read a word from the m68k memory.
There are quirks with word wide reads see section 1.2 of http://cgfm2.emuviews.com/txt/gen-hw.txt
| a | Address to read |
| void md::misc_writebyte | ( | uint32_t | a, |
| uint8_t | d | ||
| ) |
write a byte to the m68Ks ram.
| a | Address to write. |
| d | Date (byte) two write. |
| void md::misc_writeword | ( | uint32_t | a, |
| uint16_t | d | ||
| ) |
Write a word to m68k memory.
| a | Address to write to. |
| d | Data to write. |
|
private |
| int md::myfm_write | ( | int | a, |
| int | v, | ||
| int | md | ||
| ) |
|
private |
|
inline |
| void md::pad_update | ( | ) |
| int md::patch | ( | const char * | list, |
| unsigned int * | errors, | ||
| unsigned int * | applied, | ||
| unsigned int * | reverted | ||
| ) |
This takes a comma or whitespace-separated list of Game Genie and/or hex codes to patch the ROM with.
| [in] | list | List of codes separated by '\t', '\n', or ','. |
| [out] | errors | Number of codes that failed to apply. |
| [out] | applied | Number of codes that applied correctly. |
| [out] | reverted | Number of codes that were reverted. |
| int md::plug_in | ( | unsigned char * | cart, |
| int | len | ||
| ) |
Plug a cart into the MD.
| [in] | cart | Cart's memory as a byte array. |
| len | Length of the cart. |
| int md::put_save_ram | ( | FILE * | into | ) |
Write a saveram to FILE*.
| into | File to write to. |
| uint8_t md::region_guess | ( | ) |
Region to emulate according to dgen_region_order and ROM header.
|
inlinestatic |
| int md::reset | ( | ) |
Resets everything (Z80, M68K, VDP, etc).
| int md::unplug | ( | ) |
Unplug a cart from the system.
| unsigned int md::vblank | ( | ) |
|
private |
Get Z80 PC.
| void md::z80_init | ( | ) |
Initialise the Z80.
|
private |
|
private |
|
private |
| uint8_t md::z80_port_read | ( | uint16_t | a | ) |
Port read to Z80.
This is a NOP
| a | address (ignored) |
| void md::z80_port_write | ( | uint16_t | a, |
| uint8_t | d | ||
| ) |
Port write to z80 This is a Nop.
| a | address (ignored) |
| d | data (ignored) |
| uint8_t md::z80_read | ( | uint16_t | a | ) |
Read one byte from the memory space.
| a | Address to read |
| void md::z80_reset | ( | ) |
Reset the Z80.
|
private |
| void md::z80_state_dump | ( | ) |
| void md::z80_state_restore | ( | ) |
|
private |
| void md::z80_write | ( | uint16_t | a, |
| uint8_t | d | ||
| ) |
Write one byte to the memory.
| a | Address to read |
| d | Data (byte) to write. |
| int md::z80dump | ( | ) |
Dump Z80 ram to a file named "dgz80ram".
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| struct md::_carthead_ md::cart_head |
| unsigned int md::clk0 |
| unsigned int md::clk1 |
| unsigned char md::coo4 |
| unsigned char md::coo5 |
| enum md::cpu_emu md::cpu_emu |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| bool md::debug_trap |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| unsigned int md::lines |
|
staticprivate |
| int md::m68k |
| int md::m68k_max |
|
private |
| m68k_state_t md::m68k_state |
| unsigned int md::mclk |
|
private |
|
static |
This is the default ROM, used when nothing is loaded.
|
static |
| struct { ... } md::odo |
|
private |
|
private |
|
private |
| int md::pad[2] |
| uint8_t md::pad_com[2] |
| unsigned int md::pal |
| struct md::patch_elem * md::patch_elem |
| bool md::plugged |
|
private |
|
private |
| char md::region |
|
private |
|
private |
| char md::romname[256] |
|
private |
|
private |
|
private |
|
private |
|
private |
| md_vdp md::vdp |
| unsigned int md::vhz |
| int md::z80 |
|
private |
| enum md::z80_core md::z80_core |
|
private |
| int md::z80_max |
|
private |
|
private |
|
private |
|
private |
| z80_state_t md::z80_state |
|
private |
1.8.1.1