1 // Pico Library - Internal Header File
\r
3 // (c) Copyright 2004 Dave, All rights reserved.
\r
4 // (c) Copyright 2006,2007 Grazvydas "notaz" Ignotas, all rights reserved.
\r
5 // Free for non-commercial use.
\r
7 // For commercial use, separate licencing terms must be obtained.
\r
9 #ifndef PICO_INTERNAL_INCLUDED
\r
10 #define PICO_INTERNAL_INCLUDED
\r
16 #include "carthw/carthw.h"
\r
19 #define USE_POLL_DETECT
\r
21 #ifndef PICO_INTERNAL
\r
22 #define PICO_INTERNAL
\r
24 #ifndef PICO_INTERNAL_ASM
\r
25 #define PICO_INTERNAL_ASM
\r
28 // to select core, define EMU_C68K, EMU_M68K or EMU_F68K in your makefile or project
\r
35 // ----------------------- 68000 CPU -----------------------
\r
37 #include "../cpu/Cyclone/Cyclone.h"
\r
38 extern struct Cyclone PicoCpuCM68k, PicoCpuCS68k;
\r
39 #define SekCyclesLeftNoMCD PicoCpuCM68k.cycles // cycles left for this run
\r
40 #define SekCyclesLeft \
\r
41 (((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) ? (SekCycleAim-SekCycleCnt) : SekCyclesLeftNoMCD)
\r
42 #define SekCyclesLeftS68k \
\r
43 ((PicoOpt & POPT_EN_MCD_PSYNC) ? (SekCycleAimS68k-SekCycleCntS68k) : PicoCpuCS68k.cycles)
\r
44 #define SekSetCyclesLeftNoMCD(c) PicoCpuCM68k.cycles=c
\r
45 #define SekSetCyclesLeft(c) { \
\r
46 if ((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) SekCycleCnt=SekCycleAim-(c); else SekSetCyclesLeftNoMCD(c); \
\r
48 #define SekPc (PicoCpuCM68k.pc-PicoCpuCM68k.membase)
\r
49 #define SekPcS68k (PicoCpuCS68k.pc-PicoCpuCS68k.membase)
\r
50 #define SekSetStop(x) { PicoCpuCM68k.state_flags&=~1; if (x) { PicoCpuCM68k.state_flags|=1; PicoCpuCM68k.cycles=0; } }
\r
51 #define SekSetStopS68k(x) { PicoCpuCS68k.state_flags&=~1; if (x) { PicoCpuCS68k.state_flags|=1; PicoCpuCS68k.cycles=0; } }
\r
52 #define SekIsStoppedS68k() (PicoCpuCS68k.state_flags&1)
\r
53 #define SekShouldInterrupt (PicoCpuCM68k.irq > (PicoCpuCM68k.srh&7))
\r
55 #define SekInterrupt(i) PicoCpuCM68k.irq=i
\r
58 #define EMU_CORE_DEBUG
\r
63 #include "../cpu/fame/fame.h"
\r
64 extern M68K_CONTEXT PicoCpuFM68k, PicoCpuFS68k;
\r
65 #define SekCyclesLeftNoMCD PicoCpuFM68k.io_cycle_counter
\r
66 #define SekCyclesLeft \
\r
67 (((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) ? (SekCycleAim-SekCycleCnt) : SekCyclesLeftNoMCD)
\r
68 #define SekCyclesLeftS68k \
\r
69 ((PicoOpt & POPT_EN_MCD_PSYNC) ? (SekCycleAimS68k-SekCycleCntS68k) : PicoCpuFS68k.io_cycle_counter)
\r
70 #define SekSetCyclesLeftNoMCD(c) PicoCpuFM68k.io_cycle_counter=c
\r
71 #define SekSetCyclesLeft(c) { \
\r
72 if ((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) SekCycleCnt=SekCycleAim-(c); else SekSetCyclesLeftNoMCD(c); \
\r
74 #define SekPc fm68k_get_pc(&PicoCpuFM68k)
\r
75 #define SekPcS68k fm68k_get_pc(&PicoCpuFS68k)
\r
76 #define SekSetStop(x) { \
\r
77 PicoCpuFM68k.execinfo &= ~FM68K_HALTED; \
\r
78 if (x) { PicoCpuFM68k.execinfo |= FM68K_HALTED; PicoCpuFM68k.io_cycle_counter = 0; } \
\r
80 #define SekSetStopS68k(x) { \
\r
81 PicoCpuFS68k.execinfo &= ~FM68K_HALTED; \
\r
82 if (x) { PicoCpuFS68k.execinfo |= FM68K_HALTED; PicoCpuFS68k.io_cycle_counter = 0; } \
\r
84 #define SekIsStoppedS68k() (PicoCpuFS68k.execinfo&FM68K_HALTED)
\r
85 #define SekShouldInterrupt fm68k_would_interrupt()
\r
87 #define SekInterrupt(irq) PicoCpuFM68k.interrupts[0]=irq
\r
90 #define EMU_CORE_DEBUG
\r
95 #include "../cpu/musashi/m68kcpu.h"
\r
96 extern m68ki_cpu_core PicoCpuMM68k, PicoCpuMS68k;
\r
97 #ifndef SekCyclesLeft
\r
98 #define SekCyclesLeftNoMCD PicoCpuMM68k.cyc_remaining_cycles
\r
99 #define SekCyclesLeft \
\r
100 (((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) ? (SekCycleAim-SekCycleCnt) : SekCyclesLeftNoMCD)
\r
101 #define SekCyclesLeftS68k \
\r
102 ((PicoOpt & POPT_EN_MCD_PSYNC) ? (SekCycleAimS68k-SekCycleCntS68k) : PicoCpuMS68k.cyc_remaining_cycles)
\r
103 #define SekSetCyclesLeftNoMCD(c) SET_CYCLES(c)
\r
104 #define SekSetCyclesLeft(c) { \
\r
105 if ((PicoAHW&1) && (PicoOpt & POPT_EN_MCD_PSYNC)) SekCycleCnt=SekCycleAim-(c); else SET_CYCLES(c); \
\r
107 #define SekPc m68k_get_reg(&PicoCpuMM68k, M68K_REG_PC)
\r
108 #define SekPcS68k m68k_get_reg(&PicoCpuMS68k, M68K_REG_PC)
\r
109 #define SekSetStop(x) { \
\r
110 if(x) { SET_CYCLES(0); PicoCpuMM68k.stopped=STOP_LEVEL_STOP; } \
\r
111 else PicoCpuMM68k.stopped=0; \
\r
113 #define SekSetStopS68k(x) { \
\r
114 if(x) { SET_CYCLES(0); PicoCpuMS68k.stopped=STOP_LEVEL_STOP; } \
\r
115 else PicoCpuMS68k.stopped=0; \
\r
117 #define SekIsStoppedS68k() (PicoCpuMS68k.stopped==STOP_LEVEL_STOP)
\r
118 #define SekShouldInterrupt (CPU_INT_LEVEL > FLAG_INT_MASK)
\r
120 #define SekInterrupt(irq) { \
\r
121 void *oldcontext = m68ki_cpu_p; \
\r
122 m68k_set_context(&PicoCpuMM68k); \
\r
123 m68k_set_irq(irq); \
\r
124 m68k_set_context(oldcontext); \
\r
130 extern int SekCycleCnt; // cycles done in this frame
\r
131 extern int SekCycleAim; // cycle aim
\r
132 extern unsigned int SekCycleCntT; // total cycle counter, updated once per frame
\r
134 #define SekCyclesReset() { \
\r
135 SekCycleCntT+=SekCycleAim; \
\r
136 SekCycleCnt-=SekCycleAim; \
\r
139 #define SekCyclesBurn(c) SekCycleCnt+=c
\r
140 #define SekCyclesDone() (SekCycleAim-SekCyclesLeft) // nuber of cycles done in this frame (can be checked anywhere)
\r
141 #define SekCyclesDoneT() (SekCycleCntT+SekCyclesDone()) // total nuber of cycles done for this rom
\r
143 #define SekEndRun(after) { \
\r
144 SekCycleCnt -= SekCyclesLeft - after; \
\r
145 if(SekCycleCnt < 0) SekCycleCnt = 0; \
\r
146 SekSetCyclesLeft(after); \
\r
149 extern int SekCycleCntS68k;
\r
150 extern int SekCycleAimS68k;
\r
152 #define SekCyclesResetS68k() { \
\r
153 SekCycleCntS68k-=SekCycleAimS68k; \
\r
154 SekCycleAimS68k=0; \
\r
156 #define SekCyclesDoneS68k() (SekCycleAimS68k-SekCyclesLeftS68k)
\r
158 #ifdef EMU_CORE_DEBUG
\r
159 extern int dbg_irq_level;
\r
160 #undef SekSetCyclesLeftNoMCD
\r
161 #undef SekSetCyclesLeft
\r
162 #undef SekCyclesBurn
\r
164 #undef SekInterrupt
\r
165 #define SekSetCyclesLeftNoMCD(c)
\r
166 #define SekSetCyclesLeft(c)
\r
167 #define SekCyclesBurn(c) c
\r
168 #define SekEndRun(c)
\r
169 #define SekInterrupt(irq) dbg_irq_level=irq
\r
172 // ----------------------- Z80 CPU -----------------------
\r
174 #if defined(_USE_MZ80)
\r
175 #include "../cpu/mz80/mz80.h"
\r
177 #define z80_run(cycles) mz80_run(cycles)
\r
178 #define z80_run_nr(cycles) mz80_run(cycles)
\r
179 #define z80_int() mz80int(0)
\r
180 #define z80_resetCycles() mz80GetElapsedTicks(1)
\r
182 #elif defined(_USE_DRZ80)
\r
183 #include "../cpu/DrZ80/drz80.h"
\r
185 extern struct DrZ80 drZ80;
\r
187 #define z80_run(cycles) ((cycles) - DrZ80Run(&drZ80, cycles))
\r
188 #define z80_run_nr(cycles) DrZ80Run(&drZ80, cycles)
\r
189 #define z80_int() { \
\r
190 drZ80.z80irqvector = 0xFF; /* default IRQ vector RST opcode */ \
\r
191 drZ80.Z80_IRQ = 1; \
\r
193 #define z80_resetCycles()
\r
195 #elif defined(_USE_CZ80)
\r
196 #include "../cpu/cz80/cz80.h"
\r
198 #define z80_run(cycles) Cz80_Exec(&CZ80, cycles)
\r
199 #define z80_run_nr(cycles) Cz80_Exec(&CZ80, cycles)
\r
200 #define z80_int() Cz80_Set_IRQ(&CZ80, 0, HOLD_LINE)
\r
201 #define z80_resetCycles()
\r
205 #define z80_run(cycles) (cycles)
\r
206 #define z80_run_nr(cycles)
\r
208 #define z80_resetCycles()
\r
212 // ---------------------------------------------------------
\r
215 #define PAHW_MCD (1<<0)
\r
216 #define PAHW_32X (1<<1)
\r
217 #define PAHW_SVP (1<<2)
\r
218 #define PAHW_PICO (1<<3)
\r
219 extern int PicoAHW;
\r
221 // main oscillator clock which controls timing
\r
222 #define OSC_NTSC 53693100
\r
223 // seems to be accurate, see scans from http://www.hot.ee/tmeeco/
\r
224 #define OSC_PAL 53203424
\r
228 unsigned char reg[0x20];
\r
229 unsigned int command; // 32-bit Command
\r
230 unsigned char pending; // 1 if waiting for second half of 32-bit command
\r
231 unsigned char type; // Command type (v/c/vsram read/write)
\r
232 unsigned short addr; // Read/Write address
\r
233 int status; // Status bits
\r
234 unsigned char pending_ints; // pending interrupts: ??VH????
\r
235 signed char lwrite_cnt; // VDP write count during active display line
\r
236 unsigned char pad[0x12];
\r
241 unsigned char rotate;
\r
242 unsigned char z80Run;
\r
243 unsigned char padTHPhase[2]; // 02 phase of gamepad TH switches
\r
244 short scanline; // 04 0 to 261||311; -1 in fast mode
\r
245 char dirtyPal; // 06 Is the palette dirty (1 - change @ this frame, 2 - some time before)
\r
246 unsigned char hardware; // 07 Hardware value for country
\r
247 unsigned char pal; // 08 1=PAL 0=NTSC
\r
248 unsigned char sram_reg; // SRAM mode register. bit0: allow read? bit1: deny write? bit2: EEPROM? bit4: detected? (header or by access)
\r
249 unsigned short z80_bank68k; // 0a
\r
250 unsigned short z80_lastaddr; // this is for Z80 faking
\r
251 unsigned char z80_fakeval;
\r
252 unsigned char z80_reset; // z80 reset held
\r
253 unsigned char padDelay[2]; // 10 gamepad phase time outs, so we count a delay
\r
254 unsigned short eeprom_addr; // EEPROM address register
\r
255 unsigned char eeprom_cycle; // EEPROM SRAM cycle number
\r
256 unsigned char eeprom_slave; // EEPROM slave word for X24C02 and better SRAMs
\r
257 unsigned char prot_bytes[2]; // simple protection faking
\r
258 unsigned short dma_xfers;
\r
259 unsigned char pad[2];
\r
260 unsigned int frame_count; // mainly for movies
\r
263 // some assembly stuff depend on these, do not touch!
\r
266 unsigned char ram[0x10000]; // 0x00000 scratch ram
\r
267 unsigned short vram[0x8000]; // 0x10000
\r
268 unsigned char zram[0x2000]; // 0x20000 Z80 ram
\r
269 unsigned char ioports[0x10];
\r
270 unsigned int pad[0x3c]; // unused
\r
271 unsigned short cram[0x40]; // 0x22100
\r
272 unsigned short vsram[0x40]; // 0x22180
\r
274 unsigned char *rom; // 0x22200
\r
275 unsigned int romsize; // 0x22204
\r
278 struct PicoVideo video;
\r
284 unsigned char *data; // actual data
\r
285 unsigned int start; // start address in 68k address space
\r
287 unsigned char unused1; // 0c: unused
\r
288 unsigned char unused2;
\r
289 unsigned char changed;
\r
290 unsigned char eeprom_type; // eeprom type: 0: 7bit (24C01), 2: device with 2 addr words (X24C02+), 3: dev with 3 addr words
\r
291 unsigned char eeprom_abits; // eeprom access must be odd addr for: bit0 ~ cl, bit1 ~ out
\r
292 unsigned char eeprom_bit_cl; // bit number for cl
\r
293 unsigned char eeprom_bit_in; // bit number for in
\r
294 unsigned char eeprom_bit_out; // bit number for out
\r
298 #include "cd/cd_sys.h"
\r
299 #include "cd/LC89510.h"
\r
300 #include "cd/gfx_cd.h"
\r
304 unsigned char control; // reg7
\r
305 unsigned char enabled; // reg8
\r
306 unsigned char cur_ch;
\r
307 unsigned char bank;
\r
310 struct pcm_chan // 08, size 0x10
\r
312 unsigned char regs[8];
\r
313 unsigned int addr; // .08: played sample address
\r
320 unsigned short hint_vector;
\r
321 unsigned char busreq;
\r
322 unsigned char s68k_pend_ints;
\r
323 unsigned int state_flags; // 04: emu state: reset_pending, dmna_pending
\r
324 unsigned int counter75hz;
\r
326 int timer_int3; // 10
\r
327 unsigned int timer_stopwatch;
\r
328 unsigned char bcram_reg; // 18: battery-backed RAM cart register
\r
329 unsigned char pad2;
\r
330 unsigned short pad3;
\r
336 unsigned char bios[0x20000]; // 000000: 128K
\r
337 union { // 020000: 512K
\r
338 unsigned char prg_ram[0x80000];
\r
339 unsigned char prg_ram_b[4][0x20000];
\r
341 union { // 0a0000: 256K
\r
343 unsigned char word_ram2M[0x40000];
\r
344 unsigned char unused0[0x20000];
\r
347 unsigned char unused1[0x20000];
\r
348 unsigned char word_ram1M[2][0x20000];
\r
351 union { // 100000: 64K
\r
352 unsigned char pcm_ram[0x10000];
\r
353 unsigned char pcm_ram_b[0x10][0x1000];
\r
355 unsigned char s68k_regs[0x200]; // 110000: GA, not CPU regs
\r
356 unsigned char bram[0x2000]; // 110200: 8K
\r
357 struct mcd_misc m; // 112200: misc
\r
358 struct mcd_pcm pcm; // 112240:
\r
359 _scd_toc TOC; // not to be saved
\r
366 #define Pico_mcd ((mcd_state *)Pico.rom)
\r
370 PICO_INTERNAL int PicoAreaPackCpu(unsigned char *cpu, int is_sub);
\r
371 PICO_INTERNAL int PicoAreaUnpackCpu(unsigned char *cpu, int is_sub);
\r
372 extern void (*PicoLoadStateHook)(void);
\r
375 PICO_INTERNAL int PicoCdSaveState(void *file);
\r
376 PICO_INTERNAL int PicoCdLoadState(void *file);
\r
382 } carthw_state_chunk;
\r
383 extern carthw_state_chunk *carthw_chunks;
\r
384 #define CHUNK_CARTHW 64
\r
387 extern void (*PicoCartUnloadHook)(void);
\r
390 int CM_compareRun(int cyc, int is_sub);
\r
393 PICO_INTERNAL int PicoLine(int scan);
\r
394 PICO_INTERNAL void PicoFrameStart(void);
\r
397 PICO_INTERNAL void PicoFrameFull();
\r
400 PICO_INTERNAL int PicoInitPc(unsigned int pc);
\r
401 PICO_INTERNAL unsigned int PicoCheckPc(unsigned int pc);
\r
402 PICO_INTERNAL_ASM unsigned int PicoRead32(unsigned int a);
\r
403 PICO_INTERNAL void PicoMemSetup(void);
\r
404 PICO_INTERNAL_ASM void PicoMemReset(void);
\r
405 PICO_INTERNAL void PicoMemResetHooks(void);
\r
406 PICO_INTERNAL int PadRead(int i);
\r
407 PICO_INTERNAL unsigned char z80_read(unsigned short a);
\r
409 PICO_INTERNAL_ASM void z80_write(unsigned char data, unsigned short a);
\r
410 PICO_INTERNAL void z80_write16(unsigned short data, unsigned short a);
\r
411 PICO_INTERNAL unsigned short z80_read16(unsigned short a);
\r
413 PICO_INTERNAL_ASM void z80_write(unsigned int a, unsigned char data);
\r
415 extern unsigned int (*PicoRead16Hook)(unsigned int a, int realsize);
\r
416 extern void (*PicoWrite8Hook) (unsigned int a,unsigned int d,int realsize);
\r
417 extern void (*PicoWrite16Hook)(unsigned int a,unsigned int d,int realsize);
\r
420 PICO_INTERNAL void PicoMemSetupCD(void);
\r
421 PICO_INTERNAL_ASM void PicoMemResetCD(int r3);
\r
422 PICO_INTERNAL_ASM void PicoMemResetCDdecode(int r3);
\r
425 PICO_INTERNAL void PicoMemSetupPico(void);
\r
428 extern struct Pico Pico;
\r
429 extern struct PicoSRAM SRam;
\r
430 extern int emustatus;
\r
431 extern int z80startCycle, z80stopCycle; // in 68k cycles
\r
432 extern void (*PicoResetHook)(void);
\r
433 extern void (*PicoLineHook)(int count);
\r
434 PICO_INTERNAL int CheckDMA(void);
\r
435 PICO_INTERNAL void PicoDetectRegion(void);
\r
438 PICO_INTERNAL int PicoInitMCD(void);
\r
439 PICO_INTERNAL void PicoExitMCD(void);
\r
440 PICO_INTERNAL void PicoPowerMCD(void);
\r
441 PICO_INTERNAL int PicoResetMCD(void);
\r
442 PICO_INTERNAL int PicoFrameMCD(void);
\r
445 PICO_INTERNAL int PicoInitPico(void);
\r
446 PICO_INTERNAL void PicoReratePico(void);
\r
449 PICO_INTERNAL void PicoPicoPCMUpdate(short *buffer, int length, int stereo);
\r
450 PICO_INTERNAL void PicoPicoPCMReset(void);
\r
451 PICO_INTERNAL void PicoPicoPCMRerate(int xpcm_rate);
\r
454 PICO_INTERNAL int SekInit(void);
\r
455 PICO_INTERNAL int SekReset(void);
\r
456 PICO_INTERNAL void SekState(int *data);
\r
457 PICO_INTERNAL void SekSetRealTAS(int use_real);
\r
460 PICO_INTERNAL int SekInitS68k(void);
\r
461 PICO_INTERNAL int SekResetS68k(void);
\r
462 PICO_INTERNAL int SekInterruptS68k(int irq);
\r
465 PICO_INTERNAL void cdda_start_play();
\r
466 extern short cdda_out_buffer[2*1152];
\r
467 extern int PsndLen_exc_cnt;
\r
468 extern int PsndLen_exc_add;
\r
471 PICO_INTERNAL_ASM void PicoVideoWrite(unsigned int a,unsigned short d);
\r
472 PICO_INTERNAL_ASM unsigned int PicoVideoRead(unsigned int a);
\r
473 extern int (*PicoDmaHook)(unsigned int source, int len, unsigned short **srcp, unsigned short **limitp);
\r
476 PICO_INTERNAL void SRAMWriteEEPROM(unsigned int d);
\r
477 PICO_INTERNAL void SRAMUpdPending(unsigned int a, unsigned int d);
\r
478 PICO_INTERNAL_ASM unsigned int SRAMReadEEPROM(void);
\r
479 PICO_INTERNAL_ASM void memcpy16(unsigned short *dest, unsigned short *src, int count);
\r
480 PICO_INTERNAL_ASM void memcpy16bswap(unsigned short *dest, void *src, int count);
\r
481 PICO_INTERNAL_ASM void memcpy32(int *dest, int *src, int count); // 32bit word count
\r
482 PICO_INTERNAL_ASM void memset32(int *dest, int c, int count);
\r
485 PICO_INTERNAL_ASM void wram_2M_to_1M(unsigned char *m);
\r
486 PICO_INTERNAL_ASM void wram_1M_to_2M(unsigned char *m);
\r
489 PICO_INTERNAL void PicoCDBufferRead(void *dest, int lba);
\r
492 PICO_INTERNAL void PsndReset(void);
\r
493 PICO_INTERNAL void Psnd_timers_and_dac(int raster);
\r
494 PICO_INTERNAL int PsndRender(int offset, int length);
\r
495 PICO_INTERNAL void PsndClear(void);
\r
496 // z80 functionality wrappers
\r
497 PICO_INTERNAL void z80_init(void);
\r
498 PICO_INTERNAL void z80_pack(unsigned char *data);
\r
499 PICO_INTERNAL void z80_unpack(unsigned char *data);
\r
500 PICO_INTERNAL void z80_reset(void);
\r
501 PICO_INTERNAL void z80_exit(void);
\r
505 } // End of extern "C"
\r
508 // emulation event logging
\r
510 #define EL_LOGMASK 0
\r
513 #define EL_HVCNT 0x00000001 /* hv counter reads */
\r
514 #define EL_SR 0x00000002 /* SR reads */
\r
515 #define EL_INTS 0x00000004 /* ints and acks */
\r
516 #define EL_YM2612R 0x00000008 /* 68k ym2612 reads */
\r
517 #define EL_INTSW 0x00000010 /* log irq switching on/off */
\r
518 #define EL_ASVDP 0x00000020 /* VDP accesses during active scan */
\r
519 #define EL_VDPDMA 0x00000040 /* VDP DMA transfers and their timing */
\r
520 #define EL_BUSREQ 0x00000080 /* z80 busreq r/w or reset w */
\r
521 #define EL_Z80BNK 0x00000100 /* z80 i/o through bank area */
\r
522 #define EL_SRAMIO 0x00000200 /* sram i/o */
\r
523 #define EL_EEPROM 0x00000400 /* eeprom debug */
\r
524 #define EL_UIO 0x00000800 /* unmapped i/o */
\r
525 #define EL_IO 0x00001000 /* all i/o */
\r
526 #define EL_CDPOLL 0x00002000 /* MCD: log poll detection */
\r
527 #define EL_SVP 0x00004000 /* SVP stuff */
\r
529 #define EL_STATUS 0x40000000 /* status messages */
\r
530 #define EL_ANOMALY 0x80000000 /* some unexpected conditions (during emulation) */
\r
533 extern void lprintf(const char *fmt, ...);
\r
534 #define elprintf(w,f,...) \
\r
536 if ((w) & EL_LOGMASK) \
\r
537 lprintf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \
\r
539 #elif defined(_MSC_VER)
\r
542 #define elprintf(w,f,...)
\r
548 #define cdprintf(x...)
\r
551 #endif // PICO_INTERNAL_INCLUDED
\r