annotate sega_mapper.h @ 2496:187bc857a76a default tip

Fix bug in MED mapper protection bit implementation
author Michael Pavone <pavone@retrodev.com>
date Sun, 28 Apr 2024 23:33:11 -0700
parents b9cd3c64652d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1415
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef SEGA_MAPPER_H_
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define SEGA_MAPPER_H_
1444
14a2834d010c Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents: 1415
diff changeset
3 #include "serialize.h"
1415
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 uint16_t read_sram_w(uint32_t address, m68k_context * context);
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 uint8_t read_sram_b(uint32_t address, m68k_context * context);
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 m68k_context * write_sram_area_w(uint32_t address, m68k_context * context, uint16_t value);
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 m68k_context * write_sram_area_b(uint32_t address, m68k_context * context, uint8_t value);
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 m68k_context * write_bank_reg_w(uint32_t address, m68k_context * context, uint16_t value);
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 m68k_context * write_bank_reg_b(uint32_t address, m68k_context * context, uint8_t value);
2340
b9cd3c64652d Slightly more correct implementation of MED extended Sega mapper so s2built debug build doesn't hang
Michael Pavone <pavone@retrodev.com>
parents: 2052
diff changeset
11 uint16_t med_reg_read_w(uint32_t address, void *vcontext);
b9cd3c64652d Slightly more correct implementation of MED extended Sega mapper so s2built debug build doesn't hang
Michael Pavone <pavone@retrodev.com>
parents: 2052
diff changeset
12 uint8_t med_reg_read_b(uint32_t address, void *vcontext);
2052
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
13 void* write_med_ram0_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
14 void* write_med_ram1_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
15 void* write_med_ram2_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
16 void* write_med_ram3_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
17 void* write_med_ram4_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
18 void* write_med_ram5_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
19 void* write_med_ram6_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
20 void* write_med_ram7_w(uint32_t address, void *vcontext, uint16_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
21 void* write_med_ram0_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
22 void* write_med_ram1_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
23 void* write_med_ram2_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
24 void* write_med_ram3_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
25 void* write_med_ram4_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
26 void* write_med_ram5_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
27 void* write_med_ram6_b(uint32_t address, void *vcontext, uint8_t value);
3748a2a8a4b7 Support Sega mapper without 'SEGA SSF' in header or ROM DB entry and implement a subset of the extended Sega mapper implemented in the Mega Everdrive when 'SEGA SSF' is present
Michael Pavone <pavone@retrodev.com>
parents: 1444
diff changeset
28 void* write_med_ram7_b(uint32_t address, void *vcontext, uint8_t value);
1444
14a2834d010c Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents: 1415
diff changeset
29 void sega_mapper_serialize(genesis_context *gen, serialize_buffer *buf);
14a2834d010c Save/restore mapper state in native save states
Michael Pavone <pavone@retrodev.com>
parents: 1415
diff changeset
30 void sega_mapper_deserialize(deserialize_buffer *buf, genesis_context *gen);
1415
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
31
f7d653bb8899 Move Sega mapper implementation out of romdb.c
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
32 #endif //SEGA_MAPPER_H_