Skip to content

Commit

Permalink
Improved generation of software DIPs data in ROM
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dciabrin committed Aug 23, 2024
1 parent c8d3231 commit f9cd5cb
Show file tree
Hide file tree
Showing 3 changed files with 415 additions and 121 deletions.
11 changes: 10 additions & 1 deletion include/ngdevkit/bios-ram.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* BIOS state variables in memory
* Copyright (c) 2020 Damien Ciabrini
* Copyright (c) 2020-2024 Damien Ciabrini
* This file is part of ngdevkit
*
* ngdevkit is free software: you can redistribute it and/or modify
Expand All @@ -20,6 +20,8 @@
#ifndef __NGDEVKIT_BIOS_RAM_H__
#define __NGDEVKIT_BIOS_RAM_H__

#include <ngdevkit/types.h>

// BIOS checks
extern u8 bios_z80rom_check;
extern u8 bios_slot_check;
Expand All @@ -32,6 +34,13 @@ extern u8 bios_sysret_status;
extern u8 bios_mvs_flag;
extern u8 bios_country_code;

#define BIOS_TYPE_AES 0
#define BIOS_TYPE_MVS 1

#define BIOS_COUNTRY_JP 0
#define BIOS_COUNTRY_US 1
#define BIOS_COUNTRY_EU 2

// Game DIP switches
extern u8 bios_game_dip[16];

Expand Down
Loading

0 comments on commit f9cd5cb

Please sign in to comment.