annotate blastem.h @ 953:08346262990b

Remove the int number argument to vdp_int_ack since it is no longer used
author Michael Pavone <pavone@retrodev.com>
date Tue, 12 Apr 2016 21:38:24 -0700
parents 5e4fb650de58
children f5550cdffe49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
467
140af5509ce7 Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents: 451
diff changeset
1 /*
140af5509ce7 Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents: 451
diff changeset
2 Copyright 2013 Michael Pavone
483
3e1573fa22cf Implement turbo/slow motion feature that overclocks or underclocks the entire system at the push of a button
Mike Pavone <pavone@retrodev.com>
parents: 467
diff changeset
3 This file is part of BlastEm.
467
140af5509ce7 Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents: 451
diff changeset
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
140af5509ce7 Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents: 451
diff changeset
5 */
66
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 #ifndef BLASTEM_H_
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 #define BLASTEM_H_
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8
75
108e587165c0 Implement DMA (untested)
Mike Pavone <pavone@retrodev.com>
parents: 66
diff changeset
9 #include <stdint.h>
569
9b7fcf748be0 Rename x86_68k_options and m68k_to_x86.h to m68k_options and m68k_core.h respectively
Michael Pavone <pavone@retrodev.com>
parents: 524
diff changeset
10 #include "m68k_core.h"
288
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
11 #include "z80_to_x86.h"
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
12 #include "ym2612.h"
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
13 #include "vdp.h"
354
15dd6418fe67 Initial PSG support. Mostly works, noise channel is borked though.
Mike Pavone <pavone@retrodev.com>
parents: 351
diff changeset
14 #include "psg.h"
421
d0cacb4ade0b Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents: 418
diff changeset
15 #include "io.h"
430
7f84090ab1cd Add config file parser and default config file
Mike Pavone <pavone@retrodev.com>
parents: 421
diff changeset
16 #include "config.h"
769
4638b88bc72d Initial work on I2C EEPROM implementation
Michael Pavone <pavone@retrodev.com>
parents: 767
diff changeset
17 #include "romdb.h"
883
9f149f0e98b7 It is now possible to switch back and forth between the menu ROM and the game
Michael Pavone <pavone@retrodev.com>
parents: 874
diff changeset
18 #include "arena.h"
66
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19
288
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
20 typedef struct {
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
21 m68k_context *m68k;
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
22 z80_context *z80;
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
23 vdp_context *vdp;
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
24 ym2612_context *ym;
354
15dd6418fe67 Initial PSG support. Mostly works, noise channel is borked though.
Mike Pavone <pavone@retrodev.com>
parents: 351
diff changeset
25 psg_context *psg;
883
9f149f0e98b7 It is now possible to switch back and forth between the menu ROM and the game
Michael Pavone <pavone@retrodev.com>
parents: 874
diff changeset
26 uint16_t *cart;
801
092524bb2e8f Fix GDB remote debugging support
Michael Pavone <pavone@retrodev.com>
parents: 776
diff changeset
27 uint16_t *work_ram;
092524bb2e8f Fix GDB remote debugging support
Michael Pavone <pavone@retrodev.com>
parents: 776
diff changeset
28 uint8_t *zram;
866
69a6ec208111 Menu ROM now pulls real file names from the OS rather than using a fake list
Michael Pavone <pavone@retrodev.com>
parents: 801
diff changeset
29 void *extra;
883
9f149f0e98b7 It is now possible to switch back and forth between the menu ROM and the game
Michael Pavone <pavone@retrodev.com>
parents: 874
diff changeset
30 arena *arena;
874
b6842dfb8edf ROM is now run after being selected in menu. Initial path for menu is read from config file.
Michael Pavone <pavone@retrodev.com>
parents: 866
diff changeset
31 char *next_rom;
767
ea525f600b1d SRAM detection from ROM header is no working correctly again
Michael Pavone <pavone@retrodev.com>
parents: 766
diff changeset
32 uint8_t *save_storage;
769
4638b88bc72d Initial work on I2C EEPROM implementation
Michael Pavone <pavone@retrodev.com>
parents: 767
diff changeset
33 eeprom_map *eeprom_map;
4638b88bc72d Initial work on I2C EEPROM implementation
Michael Pavone <pavone@retrodev.com>
parents: 767
diff changeset
34 uint32_t num_eeprom;
767
ea525f600b1d SRAM detection from ROM header is no working correctly again
Michael Pavone <pavone@retrodev.com>
parents: 766
diff changeset
35 uint32_t save_size;
351
2f264d2a60c2 Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents: 288
diff changeset
36 uint32_t save_ram_mask;
483
3e1573fa22cf Implement turbo/slow motion feature that overclocks or underclocks the entire system at the push of a button
Mike Pavone <pavone@retrodev.com>
parents: 467
diff changeset
37 uint32_t master_clock; //Current master clock value
3e1573fa22cf Implement turbo/slow motion feature that overclocks or underclocks the entire system at the push of a button
Mike Pavone <pavone@retrodev.com>
parents: 467
diff changeset
38 uint32_t normal_clock; //Normal master clock (used to restore master clock after turbo mode)
696
0b2242bbc84a Added config option to allow specifying a max sync cycle smaller than the end of frame
Michael Pavone <pavone@retrodev.com>
parents: 668
diff changeset
39 uint32_t frame_end;
0b2242bbc84a Added config option to allow specifying a max sync cycle smaller than the end of frame
Michael Pavone <pavone@retrodev.com>
parents: 668
diff changeset
40 uint32_t max_cycles;
351
2f264d2a60c2 Support for SRAM with SEGA mapper. Half-finished support for SRAM without SEGA mapper.
Mike Pavone <pavone@retrodev.com>
parents: 288
diff changeset
41 uint8_t bank_regs[8];
776
cbf97d335444 Full support for Sega mapper when it comes to data. Code in remapped sections may not work reliably. SSF2 now works.
Michael Pavone <pavone@retrodev.com>
parents: 769
diff changeset
42 uint16_t mapper_start_index;
767
ea525f600b1d SRAM detection from ROM header is no working correctly again
Michael Pavone <pavone@retrodev.com>
parents: 766
diff changeset
43 uint8_t save_type;
421
d0cacb4ade0b Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents: 418
diff changeset
44 io_port ports[3];
508
b976c6d6e5fb Initial attempt at emulating extended bank area access delays when 68K bus is busy with VDP stuff. Also emulate the extra delay on the second access of a word-wide read to the bank area. Needs work as it seems to break stuff.
Michael Pavone <pavone@retrodev.com>
parents: 505
diff changeset
45 uint8_t bus_busy;
949
5e4fb650de58 Make Exit option in menu work
Michael Pavone <pavone@retrodev.com>
parents: 883
diff changeset
46 uint8_t should_exit;
769
4638b88bc72d Initial work on I2C EEPROM implementation
Michael Pavone <pavone@retrodev.com>
parents: 767
diff changeset
47 eeprom_state eeprom;
288
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
48 } genesis_context;
a8ee7934a1f8 Add a YM2612 stub implementation with just timers and status registers so that games that depend on it can run.
Mike Pavone <pavone@retrodev.com>
parents: 198
diff changeset
49
421
d0cacb4ade0b Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents: 418
diff changeset
50 extern genesis_context * genesis;
505
b7b7a1cab44a The local clone on my laptop got messed up and some changes had not been pushed. This commit represents the status of the working copy from that clone. It unfortunately contains some changes that I did not intend to commit yet, but this seems like the best option at the moment.
Michael Pavone <pavone@retrodev.com>
parents: 483
diff changeset
51 extern int headless;
421
d0cacb4ade0b Move IO code to a separate file and do a tiny bit of refactoring
Mike Pavone <pavone@retrodev.com>
parents: 418
diff changeset
52 extern int break_on_sync;
451
b7c3b2d22858 Added support for saving savestates. Added gst savestate format test harness
Mike Pavone <pavone@retrodev.com>
parents: 430
diff changeset
53 extern int save_state;
430
7f84090ab1cd Add config file parser and default config file
Mike Pavone <pavone@retrodev.com>
parents: 421
diff changeset
54 extern tern_node * config;
66
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
55
524
fb39534b6604 Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents: 508
diff changeset
56 #define RAM_WORDS 32 * 1024
fb39534b6604 Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents: 508
diff changeset
57 #define Z80_RAM_BYTES 8 * 1024
fb39534b6604 Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents: 508
diff changeset
58
776
cbf97d335444 Full support for Sega mapper when it comes to data. Code in remapped sections may not work reliably. SSF2 now works.
Michael Pavone <pavone@retrodev.com>
parents: 769
diff changeset
59 extern uint16_t *cart;
883
9f149f0e98b7 It is now possible to switch back and forth between the menu ROM and the game
Michael Pavone <pavone@retrodev.com>
parents: 874
diff changeset
60 extern uint16_t *ram;
524
fb39534b6604 Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents: 508
diff changeset
61 extern uint8_t z80_ram[Z80_RAM_BYTES];
fb39534b6604 Move debugging code outside of main source file
Mike Pavone <pavone@retrodev.com>
parents: 508
diff changeset
62
75
108e587165c0 Implement DMA (untested)
Mike Pavone <pavone@retrodev.com>
parents: 66
diff changeset
63 uint16_t read_dma_value(uint32_t address);
707
8aa9aacefe12 Sync machine state before entering debugger
Michael Pavone <pavone@retrodev.com>
parents: 696
diff changeset
64 m68k_context * sync_components(m68k_context *context, uint32_t address);
198
209a37eed3e7 Add support for breaking into the debugger while game is running
Mike Pavone <pavone@retrodev.com>
parents: 75
diff changeset
65 m68k_context * debugger(m68k_context * context, uint32_t address);
483
3e1573fa22cf Implement turbo/slow motion feature that overclocks or underclocks the entire system at the push of a button
Mike Pavone <pavone@retrodev.com>
parents: 467
diff changeset
66 void set_speed_percent(genesis_context * context, uint32_t percent);
66
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
67
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
68 #endif //BLASTEM_H_
7a22a0e6c004 Gamepad support
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
69