diff options
author | 2024-01-07 00:36:54 +0100 | |
---|---|---|
committer | 2024-01-07 00:36:54 +0100 | |
commit | 8986d48306eeacff191c649fa321df4105765695 (patch) | |
tree | 9b69479252b6a6017104dcc50454d6157c0f85f4 /src | |
parent | a4d6dd2fa3d735fc61f0d49db1a8a001861be16f (diff) |
amiga: misc cleanups
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/machine/amiga_copper.cpp | 13 | ||||
-rw-r--r-- | src/mame/amiga/amiga.h | 4 | ||||
-rw-r--r-- | src/mame/amiga/amiga_m.cpp | 23 |
3 files changed, 22 insertions, 18 deletions
diff --git a/src/devices/machine/amiga_copper.cpp b/src/devices/machine/amiga_copper.cpp index aa6bd60bc4a..df2cee3c2bb 100644 --- a/src/devices/machine/amiga_copper.cpp +++ b/src/devices/machine/amiga_copper.cpp @@ -19,7 +19,8 @@ - Find & verify cdang examples (especially for ECS/AGA); - Find & verify examples that uses this non-canonically, i.e. anything that may use this for controlling Paula, FDC or Blitter; - - Add debugger command for printing the current disassembler structure; + - Add debugger command for printing the current disassembler structure + (current live logging is painfully slow in places, cfr. lweapon); **************************************************************************************************/ @@ -33,6 +34,8 @@ #define LOG_CHIPSET (1U << 5) // Show custom chipset writes #define VERBOSE (LOG_WARN) +//#define VERBOSE (LOG_WARN | LOG_CHIPSET | LOG_PC | LOG_INST) +//#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" @@ -245,7 +248,7 @@ int amiga_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy) if (m_pending_offset) { //LOGCHIPSET("%02X.%02X: Write to %s = %04x\n", ypos, xpos / 2, s_custom_reg_names[m_copper_pending_offset & 0xff], m_copper_pending_data); - LOGCHIPSET("%02X.%02X: Write to $dff%03x = %04x\n", + LOGCHIPSET("%02X.%02X: MOVE $dff%03x = %04x\n", ypos, xpos / 2, (m_pending_offset << 1), @@ -313,7 +316,7 @@ int amiga_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy) if (delay[word0] == 0) { //LOGCHIPSET("%02X.%02X: Write to %s = %04x\n", ypos, xpos / 2, s_custom_reg_names[word0 & 0xff], word1); - LOGCHIPSET("%02X.%02X: Write to $dff%03x = %04x\n", + LOGCHIPSET("%02X.%02X: MOVE $dff%03x = %04x\n", ypos, xpos / 2, word0 << 1, @@ -352,7 +355,7 @@ int amiga_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy) /* handle a wait */ if ((word1 & 1) == 0) { - LOGINST(" Waiting for %04x & %04x (currently %04x)\n", + LOGINST(" WAIT %04x & %04x (currently %04x)\n", m_waitval, m_waitmask, (ypos << 8) | (xpos >> 1) @@ -366,7 +369,7 @@ int amiga_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy) { int curpos = (ypos << 8) | (xpos >> 1); - LOGINST(" Skipping if %04x & %04x (currently %04x)\n", + LOGINST(" SKIP %04x & %04x (currently %04x)\n", m_waitval, m_waitmask, (ypos << 8) | (xpos >> 1) diff --git a/src/mame/amiga/amiga.h b/src/mame/amiga/amiga.h index b7b36c4b9e0..2ecbe1d877d 100644 --- a/src/mame/amiga/amiga.h +++ b/src/mame/amiga/amiga.h @@ -438,8 +438,8 @@ public: void update_screenmode(); TIMER_CALLBACK_MEMBER( scanline_callback ); - TIMER_CALLBACK_MEMBER (amiga_irq_proc ); - TIMER_CALLBACK_MEMBER( amiga_blitter_proc ); + TIMER_CALLBACK_MEMBER( irq_process_callback ); + TIMER_CALLBACK_MEMBER( blitter_process_callback ); void update_irqs(); template <int P> DECLARE_CUSTOM_INPUT_MEMBER( amiga_joystick_convert ); diff --git a/src/mame/amiga/amiga_m.cpp b/src/mame/amiga/amiga_m.cpp index 2a79a27bf2e..15f1739aea0 100644 --- a/src/mame/amiga/amiga_m.cpp +++ b/src/mame/amiga/amiga_m.cpp @@ -14,7 +14,6 @@ #include "amiga.h" #include "cpu/m68000/m68000.h" - /************************************* * * Debugging @@ -165,8 +164,8 @@ void amiga_state::machine_start() m_chip_ram_mask = (m_chip_ram.bytes() - 1) & ~1; // set up the timers - m_irq_timer = timer_alloc(FUNC(amiga_state::amiga_irq_proc), this); - m_blitter_timer = timer_alloc(FUNC(amiga_state::amiga_blitter_proc), this); + m_irq_timer = timer_alloc(FUNC(amiga_state::irq_process_callback), this); + m_blitter_timer = timer_alloc(FUNC(amiga_state::blitter_process_callback), this); m_serial_timer = timer_alloc(FUNC(amiga_state::serial_shift), this); m_scanline_timer = timer_alloc(FUNC(amiga_state::scanline_callback), this); @@ -240,6 +239,7 @@ void amiga_state::vblank() } // TODO: CIA A clock can be connected to either a fixed 50/60hz signal from the power supply, or the vblank +// TODO: move almost everything to a DMA scheduler, cfr. HRM diagram TIMER_CALLBACK_MEMBER( amiga_state::scanline_callback ) { int scanline = param; @@ -360,7 +360,7 @@ void amiga_state::update_irqs() CUSTOM_REG(REG_INTREQ) |= INTENA_EXTER; } -TIMER_CALLBACK_MEMBER( amiga_state::amiga_irq_proc ) +TIMER_CALLBACK_MEMBER( amiga_state::irq_process_callback ) { update_irqs(); m_irq_timer->reset(); @@ -853,7 +853,7 @@ uint32_t amiga_state::blit_line() * *************************************/ -TIMER_CALLBACK_MEMBER( amiga_state::amiga_blitter_proc ) +TIMER_CALLBACK_MEMBER( amiga_state::blitter_process_callback ) { uint32_t blitsum = 0; @@ -947,14 +947,14 @@ void amiga_state::blitter_setup() /* compute the blit time */ // TODO: verify timings - // According to https://github.com/alpine9000/amiga_examples test 010, - // blitting is currently taking half the time than necessary. - // Is it expecting to account for RAM access waitstates or ...? + // - https://github.com/alpine9000/amiga_examples test 010, + // blitting is currently taking half the time than necessary. + // - viz does heavy bbusy checks. blittime = ticks * height * width; /* if 'blitter-nasty' is set, then the blitter takes over the bus. Make the blit semi-immediate */ - // TODO: blitter nasty doesn't seem to work as intended. - // cfr. spinwrld + // FIXME: emulate bus priority implications here + // cfr. spinwrld no backgrounds if ( CUSTOM_REG(REG_DMACON) & 0x0400 ) { /* simulate the 68k not running while the blit is going */ @@ -1315,7 +1315,8 @@ uint16_t amiga_state::custom_chip_r(offs_t offset) return amiga_gethvpos() & 0xffff; case REG_SERDATR: - LOGMASKED(LOG_SERIAL, "r SERDATR: %04x\n", CUSTOM_REG(REG_SERDATR)); + if (!machine().side_effects_disabled()) + LOGMASKED(LOG_SERIAL, "r SERDATR: %04x\n", CUSTOM_REG(REG_SERDATR)); return CUSTOM_REG(REG_SERDATR); case REG_JOY0DAT: |