Skip to content

Commit 2502a9d

Browse files
committed
Improved generation of software DIPs data in ROM
Instead of emitting symbols for every software DIP defined, generate a single structure that holds all time, count and enum DIPs. This makes the compilation of DIP data more predictable and fixes issues with compilation with optimization enabled. Add new API functions to access the new DIP structure, and provide compatibility macros to support the old/deprecated way of accessing sotware DIPs. Closes #113
1 parent c8d3231 commit 2502a9d

File tree

4 files changed

+416
-121
lines changed

4 files changed

+416
-121
lines changed

include/ngdevkit/bios-ram.h

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* BIOS state variables in memory
3-
* Copyright (c) 2020 Damien Ciabrini
3+
* Copyright (c) 2020-2024 Damien Ciabrini
44
* This file is part of ngdevkit
55
*
66
* ngdevkit is free software: you can redistribute it and/or modify
@@ -20,6 +20,8 @@
2020
#ifndef __NGDEVKIT_BIOS_RAM_H__
2121
#define __NGDEVKIT_BIOS_RAM_H__
2222

23+
#include <ngdevkit/types.h>
24+
2325
// BIOS checks
2426
extern u8 bios_z80rom_check;
2527
extern u8 bios_slot_check;
@@ -32,6 +34,13 @@ extern u8 bios_sysret_status;
3234
extern u8 bios_mvs_flag;
3335
extern u8 bios_country_code;
3436

37+
#define BIOS_TYPE_AES 0
38+
#define BIOS_TYPE_MVS 1
39+
40+
#define BIOS_COUNTRY_JP 0
41+
#define BIOS_COUNTRY_US 1
42+
#define BIOS_COUNTRY_EU 2
43+
3544
// Game DIP switches
3645
extern u8 bios_game_dip[16];
3746

0 commit comments

Comments
 (0)