Previous 15994 Revisions Next

r2955 Wednesday 16th July, 2008 at 03:40:59 UTC by Firewave
Removed left over ENABLE_DEBUGGER occurances
[src/mess]inputx.c
[src/mess/machine]dgn_beta.c
[src/mess/tools/messtest]testmess.c tststubs.c
[src/mess/video]dgn_beta.c m6847.c

src/mess/tools/messtest/testmess.c
r2954r2955
1919#include "render.h"
2020#include "messopts.h"
2121
22#ifdef ENABLE_DEBUGGER
2322#include "debug/debugcpu.h"
24#endif /* ENABLE_DEBUGGER */
2523
2624
2725/***************************************************************************
r2954r2955
971969
972970static void command_trace(running_machine *machine)
973971{
974#ifdef ENABLE_DEBUGGER
975972   int cpunum;
976973   FILE *file;
977974   char filename[256];
r2954r2955
991988         fclose(file);
992989      }
993990   }
994#else
995   state = STATE_ABORTED;
996   report_message(MSG_FAILURE, "Cannot trace; debugger not present");
997#endif
998991}
999992
1000993
src/mess/tools/messtest/tststubs.c
r2954r2955
66#include <windows.h>
77#endif
88
9#ifdef ENABLE_DEBUGGER
10#include "cpuintrf.h"
11#include "debug/debugcpu.h"
12#endif /* ENABLE_DEBUGGER */
13
149void osd_set_mastervolume(int attenuation)
1510{
1611}
src/mess/video/dgn_beta.c
r2954r2955
8484#include "includes/dgn_beta.h"
8585#include "video/m6845.h"
8686
87#ifdef ENABLE_DEBUGGER
8887#include "debug/debugcpu.h"
8988#include "debug/debugcon.h"
90#endif
9189
9290//#define LOG_VIDEO
9391
r2954r2955
121119
122120//static BETA_VID_MODES VIDMODE = TEXT_40x25;
123121
124#ifdef ENABLE_DEBUGGER
122/* Debugging variables */
125123static int LogRegWrites   = 0;   // Log register writes to debug console.
126124static int BoxColour      = 1;
127125static int BoxMinX      = 100;
r2954r2955
131129static int HSyncMin      = 0;
132130static int VSyncMin      = 0;
133131static int DEPos      = 0;
132static int NoScreen      = 0;
134133
135// Debugging commands and handlers.
134/* Debugging commands and handlers. */
136135static void ToggleRegLog(int ref, int params, const char *param[]);
137136static void RegLog(int offset, int data);
138137static void FillScreen(int ref, int params, const char *param[]);
r2954r2955
140139static void VidToggle(int ref, int params, const char *param[]);
141140static void ShowVidLimits(int ref, int params, const char *param[]);
142141static void SetClkMax(int ref, int params, const char *param[]);
143#endif /* ENABLE_DEBUGGER */
144142
145143static bitmap_t   *bit;
146144static int MinAddr   = 0xFFFF;
r2954r2955
152150
153151static int VidAddr      = 0;   // Last address reg written
154152
155#ifdef ENABLE_DEBUGGER
156static int NoScreen      = 0;
157#endif /* ENABLE_DEBUGGER */
158
159153static void beta_Set_RA(int offset, int data);
160154static void beta_Set_HSync(int offset, int data);
161155static void beta_Set_VSync(int offset, int data);
r2954r2955
226220void vid_set_gctrl(int data)
227221{
228222   GCtrl=data;
229#ifdef ENABLE_DEBUGGER
230223   if (LogRegWrites)
231224      debug_console_printf("I28-PB=$%2X, %2X-%s-%s-%s-%s-%s-%s PC=%4X\n",
232225                 data,
r2954r2955
238231                 data & GCtrlSWChar      ? "C0" : "C1",
239232                 data & GCtrlWI      ? "Wi" : "  ",
240233                 activecpu_get_pc());
241
242
243#endif
244234}
245235
246236// called when the 6845 changes the character row
r2954r2955
273263
274264//debug_console_printf("HT=%d, HS=%d, HW=%d, (HS+HW)=%d, HT-(HS+HW)=%d\n",HT,HS,HW,(HS+HW),(HT-(HS+HW)));
275265//debug_console_printf("Scanline=%d, row=%d\n",m6845_get_scanline_counter(),m6845_get_row_counter());
276#ifdef ENABLE_DEBUGGER
277266      HSyncMin=beta_scr_x;
278#endif
279267   }
280268}
281269
r2954r2955
303291         Field=(Field+1) & 0x01;   /* Invert field */
304292//         debug_console_printf("Invert field=%d\n",Field);
305293      }
306#ifdef ENABLE_DEBUGGER
307294      VSyncMin=beta_scr_y;
308#endif
309295   }
310296
311297   dgn_beta_frame_interrupt(Machine, data);
r2954r2955
315301{
316302   beta_DE = data;
317303
318#ifdef ENABLE_DEBUGGER
319304   if(beta_DE)
320305      DEPos=beta_scr_x;
321#endif
322306}
323307
324308/* Video init */
r2954r2955
339323   DoubleY=1;
340324   DrawInterlace=INTERLACE_OFF;   /* No interlace by default */
341325
342#ifdef ENABLE_DEBUGGER
343326   /* setup debug commands */
344   if (machine->debug_mode)
327   if (machine->debug_flags & DEBUG_FLAG_ENABLED)
345328   {
346329      debug_console_register_command("beta_vid_log", CMDFLAG_NONE, 0, 0, 0,ToggleRegLog);
347330      debug_console_register_command("beta_vid_fill", CMDFLAG_NONE, 0, 0, 0,FillScreen);
r2954r2955
351334      debug_console_register_command("beta_vid_clkmax", CMDFLAG_NONE, 0, 0, 1,SetClkMax);
352335   }
353336   LogRegWrites=0;
354#endif /* ENABLE_DEBUGGER */
355337}
356338
357339/**************************/
r2954r2955
727709      m6845_address_w(offset,data);
728710      VidAddr=data;            /* Record reg being written to */
729711   }
730#ifdef ENABLE_DEBUGGER
731712   if (LogRegWrites)
732713      RegLog(offset,data);
733#endif
734714}
735715
736716/* Write handler for colour, pallate ram */
r2954r2955
745725 *
746726 *************************************/
747727
748#ifdef ENABLE_DEBUGGER
749728static void ToggleRegLog(int ref, int params, const char *param[])
750729{
751730   LogRegWrites=!LogRegWrites;
r2954r2955
843822{
844823   if(params>0)   sscanf(param[0],"%d",&ClkMax);
845824}
846
847#endif
src/mess/video/m6847.c
r2954r2955
6666#include "driver.h"
6767#include "m6847.h"
6868
69#ifdef ENABLE_DEBUGGER
7069#include "debug/debugcpu.h"
7170#include "debug/debugcon.h"
72#endif
7371
7472
7573#define LOG_FS         0
r2954r2955
14561454}
14571455
14581456
1459#ifdef ENABLE_DEBUGGER
14601457static int get_beamx(void)
14611458{
14621459   attotime scanline_time;
r2954r2955
14901487   }
14911488   return result;
14921489}
1493#endif
14941490
14951491
14961492INLINE void prepare_scanline(int xpos)
r2954r2955
16761672 *
16771673 *************************************/
16781674
1679#ifdef ENABLE_DEBUGGER
16801675
16811676static void execute_dumpscanline(int ref, int params, const char **param)
16821677{
r2954r2955
17021697   }
17031698}
17041699
1705#endif /* ENABLE_DEBUGGER */
17061700
17071701
17081702
r2954r2955
19191913      logerror("\n");
19201914   }
19211915
1922#ifdef ENABLE_DEBUGGER
19231916   /* setup debug commands */
1924   if (machine->debug_mode)
1917   if (machine->debug_flags & DEBUG_FLAG_ENABLED)
19251918      debug_console_register_command("m6847_dumpscanline", CMDFLAG_NONE, 0, 0, 0, execute_dumpscanline);
1926#endif /* ENABLE_DEBUGGER */
19271919}
19281920
19291921
src/mess/machine/dgn_beta.c
r2954r2955
6969#include "machine/wd17xx.h"
7070#include "includes/crtc6845.h"
7171
72#include "debug/debugcpu.h"
73#include "debug/debugcon.h"
74
7275static UINT8 *system_rom;
7376
7477#define VERBOSE 0
r2954r2955
8588#define LOG_INTS(x) do { if (VERBOSE) logerror x; } while (0)
8689
8790
88
89#ifdef ENABLE_DEBUGGER
90#include "debug/debugcpu.h"
91#include "debug/debugcon.h"
92#endif /* ENABLE_DEBUGGER */
93
94#ifdef ENABLE_DEBUGGER
91/* Debugging commands and handlers. */
9592static offs_t dgnbeta_dasm_override(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
9693static void ToggleDatLog(int ref, int params, const char *param[]);
9794static void DumpKeys(int ref, int params, const char *param[]);
9895
96/* Debugging variables */
9997static int LogDatWrites;
100#endif /* ENABLE_DEBUGGER */
10198
10299static READ8_HANDLER(d_pia0_pa_r);
103100static WRITE8_HANDLER(d_pia0_pa_w);
r2954r2955
262259         if (!IsIOPage(Page))
263260         {
264261            readbank = &mess_ram[MapPage*RamPageSize];
265#ifdef ENABLE_DEBUGGER
266262            if(LogDatWrites)
267263               debug_console_printf("Mapping page %X, pageno=%X, mess_ram[%X]\n",Page,MapPage,(MapPage*RamPageSize));
268#endif
269264         }
270265         else
271266         {
r2954r2955
308303   int      Idx;
309304
310305   LOG_DEFAULT_TASK(("SetDefaultTask()\n"));
311#ifdef ENABLE_DEBUGGER
312306   if (VERBOSE) debug_console_printf("Set Default task\n");
313#endif
314307
315308   TaskReg=NoPagingTask;
316309
r2954r2955
627620      RowShifter = (RowShifter<<1) | ((d_pia0_pb_last & KOutDat)>>4);
628621      RowShifter &= 0x3FF;
629622      LOG_KEYBOARD(("Rowshifter=$%02X Keyrow=$%02X\n",RowShifter,Keyrow));
630#ifdef ENABLE_DEBUGGER
631623      if (VERBOSE) debug_console_printf("rowshifter clocked, value=%3X, RowNo=%d, Keyrow=%2X\n",RowShifter,RowNo,Keyrow);
632#endif
633624   }
634625
635626   d_pia0_cb2_last=data;
r2954r2955
10831074   init_video(machine);
10841075
10851076   wd17xx_init(machine, WD_TYPE_179X,dgnbeta_fdc_callback, NULL);
1086#ifdef ENABLE_DEBUGGER
10871077   cpuintrf_set_dasm_override(0,dgnbeta_dasm_override);
1088#endif /* ENABLE_DEBUGGER */
10891078
10901079   add_reset_callback(machine, dgnbeta_reset);
10911080   dgnbeta_reset(machine);
1092#ifdef ENABLE_DEBUGGER
10931081   /* setup debug commands */
1094   if (machine->debug_mode)
1082   if (machine->debug_flags & DEBUG_FLAG_ENABLED)
10951083   {
10961084      debug_console_register_command("beta_dat_log", CMDFLAG_NONE, 0, 0, 0,ToggleDatLog);
10971085      debug_console_register_command("beta_key_dump", CMDFLAG_NONE, 0, 0, 0,DumpKeys);
10981086   }
10991087   LogDatWrites=0;
1100#endif   /* ENABLE_DEBUGGER */
11011088}
11021089
11031090
r2954r2955
11061093  OS9 Syscalls for disassembly
11071094****************************************************************************/
11081095
1109#ifdef ENABLE_DEBUGGER
11101096
11111097static const char *const os9syscalls[] =
11121098{
r2954r2955
12751261   return result;
12761262}
12771263
1278#ifdef ENABLE_DEBUGGER
12791264static void ToggleDatLog(int ref, int params, const char *param[])
12801265{
12811266   LogDatWrites=!LogDatWrites;
r2954r2955
12921277      debug_console_printf("KeyRow[%d]=%2X\n",Idx,Keyboard[Idx]);
12931278   }
12941279}
1295#endif
1296
1297#endif /* ENABLE_DEBUGGER */
src/mess/inputx.c
r2954r2955
1313#include "inptport.h"
1414#include "mame.h"
1515
16#ifdef ENABLE_DEBUGGER
1716#include "deprecat.h"
1817#include "debug/debugcon.h"
19#endif /* ENABLE_DEBUGGER */
2018
2119
2220
r2954r2955
635633static TIMER_CALLBACK(inputx_timerproc);
636634
637635
638
639#ifdef ENABLE_DEBUGGER
636/*  Debugging commands and handlers. */
640637static void execute_input(int ref, int params, const char *param[]);
641638static void execute_dumpkbd(int ref, int params, const char *param[]);
642#endif /* ENABLE_DEBUGGER */
643639
644640
645641
r2954r2955
671667   charqueue_empty = NULL;
672668   keybuffer = NULL;
673669
674#ifdef ENABLE_DEBUGGER
675   if (machine->debug_mode)
670   if (machine->debug_flags & DEBUG_FLAG_ENABLED)
676671   {
677672      debug_console_register_command("input", CMDFLAG_NONE, 0, 1, 1, execute_input);
678673      debug_console_register_command("dumpkbd", CMDFLAG_NONE, 0, 0, 1, execute_dumpkbd);
679674   }
680#endif /* ENABLE_DEBUGGER */
681675
682676   /* posting keys directly only makes sense for a computer */
683677   if (machine->gamedrv->flags & GAME_COMPUTER)
r2954r2955
15121506   natural keyboard input
15131507-------------------------------------------------*/
15141508
1515#ifdef ENABLE_DEBUGGER
15161509static void execute_input(int ref, int params, const char *param[])
15171510{
15181511   inputx_post_coded(Machine, param[0]);
15191512}
1520#endif /* ENABLE_DEBUGGER */
15211513
15221514
15231515
r2954r2955
15261518   keyboard codes
15271519-------------------------------------------------*/
15281520
1529#ifdef ENABLE_DEBUGGER
15301521static void execute_dumpkbd(int ref, int params, const char *param[])
15311522{
15321523   const char *filename;
r2954r2955
15931584      fclose(file);
15941585
15951586}
1596#endif /* ENABLE_DEBUGGER */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team