Skip to content

Commit

Permalink
Steem emulation: Trigger debugger when $ffc123 is written.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Tattersall committed Feb 16, 2021
1 parent 43bb7f8 commit b0e77a8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/debug/debugui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,3 +1374,8 @@ void DebugUI_Exceptions(int nr, long pc)
fprintf(stderr,"%s exception at 0x%lx!\n", ex[nr].name, pc);
DebugUI(REASON_CPU_EXCEPTION);
}

void DebugUI_Trigger()
{
DebugUI(REASON_USER);
}
1 change: 1 addition & 0 deletions src/debug/debugui.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ extern void DebugUI_Exceptions(int nr, long pc);
extern bool DebugUI_ParseLine(const char *input);
extern bool DebugUI_AddParseFile(const char *input);
extern void DebugUI_MemorySnapShot_Capture(const char *path, bool bSave);
extern void DebugUI_Trigger(void);

#endif /* HATARI_DEBUGUI_H */
4 changes: 4 additions & 0 deletions src/ioMemTabFalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const char IoMemTabFalc_fileid[] = "Hatari ioMemTabFalcon.c";
#include "configuration.h"
#include "statusbar.h"
#include "stMemory.h"
#include "debugui.h"
#if ENABLE_DSP_EMU
#include "falcon/dsp.h"
#endif
Expand Down Expand Up @@ -414,6 +415,9 @@ const INTERCEPT_ACCESS_FUNC IoMemTable_Falcon[] =

{ 0xffc020, SIZE_BYTE, IoMemTabFalc_Compatible_ReadByte, IoMemTabFalc_Compatible_WriteByte },
{ 0xffc021, SIZE_BYTE, IoMemTabFalc_Compatible_ReadByte, IoMemTabFalc_Compatible_WriteByte },

{ 0xffc123, SIZE_BYTE, IoMem_BusErrorOddReadAccess, DebugUI_Trigger },

{ 0xffd020, SIZE_BYTE, IoMemTabFalc_Compatible_ReadByte, IoMemTabFalc_Compatible_WriteByte },
{ 0xffd074, SIZE_WORD, IoMemTabFalc_Compatible_ReadWord, IoMemTabFalc_Compatible_WriteWord },
{ 0xffd420, SIZE_BYTE, IoMemTabFalc_Compatible_ReadByte, IoMemTabFalc_Compatible_WriteByte },
Expand Down
4 changes: 3 additions & 1 deletion src/ioMemTabST.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const char IoMemTabST_fileid[] = "Hatari ioMemTabST.c";
#include "video.h"
#include "blitter.h"
#include "stMemory.h"

#include "debugui.h"

/*-----------------------------------------------------------------------*/
/*
Expand Down Expand Up @@ -114,6 +114,8 @@ const INTERCEPT_ACCESS_FUNC IoMemTable_ST[] =
{ 0xff8a3c, SIZE_BYTE, Blitter_Control_ReadByte, Blitter_Control_WriteByte },
{ 0xff8a3d, SIZE_BYTE, Blitter_Skew_ReadByte, Blitter_Skew_WriteByte },

{ 0xffc123, SIZE_BYTE, IoMem_BusErrorOddReadAccess, DebugUI_Trigger },

{ 0xfffa01, SIZE_BYTE, MFP_GPIP_ReadByte, MFP_GPIP_WriteByte },
{ 0xfffa03, SIZE_BYTE, MFP_ActiveEdge_ReadByte, MFP_ActiveEdge_WriteByte },
{ 0xfffa05, SIZE_BYTE, MFP_DataDirection_ReadByte, MFP_DataDirection_WriteByte },
Expand Down
3 changes: 3 additions & 0 deletions src/ioMemTabSTE.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const char IoMemTabSTE_fileid[] = "Hatari ioMemTabSTE.c";
#include "blitter.h"
#include "statusbar.h"
#include "stMemory.h"
#include "debugui.h"


/**
Expand Down Expand Up @@ -213,6 +214,8 @@ const INTERCEPT_ACCESS_FUNC IoMemTable_STE[] =
{ 0xff9220, SIZE_WORD, Joy_SteLightpenX_ReadWord, IoMem_WriteWithoutInterception }, /* Lightpen X position */
{ 0xff9222, SIZE_WORD, Joy_SteLightpenY_ReadWord, IoMem_WriteWithoutInterception }, /* Lightpen Y position */

{ 0xffc123, SIZE_BYTE, IoMem_BusErrorOddReadAccess, DebugUI_Trigger },

{ 0xfffa01, SIZE_BYTE, MFP_GPIP_ReadByte, MFP_GPIP_WriteByte },
{ 0xfffa03, SIZE_BYTE, MFP_ActiveEdge_ReadByte, MFP_ActiveEdge_WriteByte },
{ 0xfffa05, SIZE_BYTE, MFP_DataDirection_ReadByte, MFP_DataDirection_WriteByte },
Expand Down
3 changes: 3 additions & 0 deletions src/ioMemTabTT.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const char IoMemTabTT_fileid[] = "Hatari ioMemTabTT.c";
#include "screen.h"
#include "video.h"
#include "stMemory.h"
#include "debugui.h"


/**
Expand Down Expand Up @@ -185,6 +186,8 @@ const INTERCEPT_ACCESS_FUNC IoMemTable_TT[] =
{ 0xff9000, SIZE_WORD, IoMem_VoidRead, IoMem_VoidWrite }, /* No bus error here */
{ 0xff9200, SIZE_WORD, IoMemTabTT_ReadDIPSwitches, IoMem_VoidWrite }, /* DIP switches */

{ 0xffc123, SIZE_BYTE, IoMem_BusErrorOddReadAccess, DebugUI_Trigger },

{ 0xfffa01, SIZE_BYTE, MFP_GPIP_ReadByte, MFP_GPIP_WriteByte },
{ 0xfffa03, SIZE_BYTE, MFP_ActiveEdge_ReadByte, MFP_ActiveEdge_WriteByte },
{ 0xfffa05, SIZE_BYTE, MFP_DataDirection_ReadByte, MFP_DataDirection_WriteByte },
Expand Down

0 comments on commit b0e77a8

Please sign in to comment.