Mercurial > repos > blastem
annotate xband.h @ 1975:3701517d852c
Avoid expensive re-init from switching to external sync after render_init has been called
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 08 May 2020 16:52:32 -0700 |
parents | 14a2834d010c |
children |
rev | line source |
---|---|
1228
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #ifndef XBAND_H_ |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #define XBAND_H_ |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #include <stdint.h> |
1444
14a2834d010c
Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents:
1229
diff
changeset
|
4 #include "serialize.h" |
1228
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 |
1229 | 6 #define XBAND_REGS 0xE0 |
1228
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 typedef struct { |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 uint16_t cart_space[0x200000]; |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 uint8_t regs[XBAND_REGS]; |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 uint8_t kill; |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 uint8_t control; |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 } xband; |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 uint8_t xband_detect(uint8_t *rom, uint32_t rom_size); |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 rom_info xband_configure_rom(tern_node *rom_db, void *rom, uint32_t rom_size, void *lock_on, uint32_t lock_on_size, memmap_chunk const *base_map, uint32_t base_chunks); |
1444
14a2834d010c
Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents:
1229
diff
changeset
|
17 void xband_serialize(genesis_context *gen, serialize_buffer *buf); |
14a2834d010c
Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents:
1229
diff
changeset
|
18 void xband_deserialize(deserialize_buffer *buf, genesis_context *gen); |
1228
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 |
2e6dcb5c11a2
WIP support for XBAND mapper hardware
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 #endif //XBAND_H_ |