annotate jaguar.h @ 1171:43fa92976ff2

Fix some timing inconsistencies in H40 mode. Added some ifdefed timing debug code.
author Michael Pavone <pavone@retrodev.com>
date Mon, 16 Jan 2017 09:31:33 -0800
parents faa3a4617f62
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef JAGUAR_H_
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define JAGUAR_H_
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3
1087
6433d4d05934 Added placeholder code for video output hardware/object processor
Michael Pavone <pavone@retrodev.com>
parents: 1083
diff changeset
4 #define DRAM_WORDS (1*1024*1024)
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 #define GPU_RAM_BYTES 4096
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 #define DSP_RAM_BYTES 8192
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7
1087
6433d4d05934 Added placeholder code for video output hardware/object processor
Michael Pavone <pavone@retrodev.com>
parents: 1083
diff changeset
8 #include "jag_video.h"
1090
a68274a25e2f Initial stab at implementing the Jaguar object processor
Michael Pavone <pavone@retrodev.com>
parents: 1087
diff changeset
9 typedef struct m68k_context m68k_context;
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 typedef struct {
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 m68k_context *m68k;
1087
6433d4d05934 Added placeholder code for video output hardware/object processor
Michael Pavone <pavone@retrodev.com>
parents: 1083
diff changeset
12 jag_video *video;
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 uint16_t *bios;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 uint16_t *cart;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 uint32_t bios_size;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16 uint32_t cart_size;
1083
f6e998227300 Byteswap ROMs in jaguar ROM loader. Handle switching memory map from writes to memcon1. Fix some typos in error messages
Michael Pavone <pavone@retrodev.com>
parents: 1080
diff changeset
17 uint32_t memcon1;
f6e998227300 Byteswap ROMs in jaguar ROM loader. Handle switching memory map from writes to memcon1. Fix some typos in error messages
Michael Pavone <pavone@retrodev.com>
parents: 1080
diff changeset
18 uint32_t memcon2;
1090
a68274a25e2f Initial stab at implementing the Jaguar object processor
Michael Pavone <pavone@retrodev.com>
parents: 1087
diff changeset
19 uint32_t rom_cycles;
1097
faa3a4617f62 Get Jaguar video interrupt working
Michael Pavone <pavone@retrodev.com>
parents: 1090
diff changeset
20 uint32_t max_cycles;
faa3a4617f62 Get Jaguar video interrupt working
Michael Pavone <pavone@retrodev.com>
parents: 1090
diff changeset
21 uint16_t cpu_int_control;
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 uint16_t write_latch;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 uint8_t write_pending;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 uint16_t dram[DRAM_WORDS];
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26 uint32_t gpu_local[GPU_RAM_BYTES / sizeof(uint32_t)];
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 uint32_t dsp_local[DSP_RAM_BYTES / sizeof(uint32_t)];
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28
1083
f6e998227300 Byteswap ROMs in jaguar ROM loader. Handle switching memory map from writes to memcon1. Fix some typos in error messages
Michael Pavone <pavone@retrodev.com>
parents: 1080
diff changeset
29 uint8_t memcon_written;
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
30 } jaguar_context;
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31
1097
faa3a4617f62 Get Jaguar video interrupt working
Michael Pavone <pavone@retrodev.com>
parents: 1090
diff changeset
32 #define BIT_CPU_VID_INT_ENABLED 0x01
faa3a4617f62 Get Jaguar video interrupt working
Michael Pavone <pavone@retrodev.com>
parents: 1090
diff changeset
33
1090
a68274a25e2f Initial stab at implementing the Jaguar object processor
Michael Pavone <pavone@retrodev.com>
parents: 1087
diff changeset
34 uint64_t jag_read_phrase(jaguar_context *system, uint32_t address, uint32_t *cycles);
a68274a25e2f Initial stab at implementing the Jaguar object processor
Michael Pavone <pavone@retrodev.com>
parents: 1087
diff changeset
35 uint32_t jag_write_phrase(jaguar_context *system, uint32_t address, uint64_t value);
a68274a25e2f Initial stab at implementing the Jaguar object processor
Michael Pavone <pavone@retrodev.com>
parents: 1087
diff changeset
36
1080
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37
382614130914 Some initial work on Atari Jaguar emulation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
38 #endif //JAGUAR_H_