mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +01:00
[Core/General] added optional dynamic allocation of cartridge/CD hardware buffer
This commit is contained in:
parent
b9b4c16272
commit
9f5dd11e93
@ -44,7 +44,11 @@
|
||||
#ifndef _MD_CART_H_
|
||||
#define _MD_CART_H_
|
||||
|
||||
#ifdef USE_DYNAMIC_ALLOC
|
||||
#define cart ext->md_cart
|
||||
#else
|
||||
#define cart ext.md_cart
|
||||
#endif
|
||||
|
||||
/* Lock-On cartridge type */
|
||||
#define TYPE_GG 0x01 /* Game Genie */
|
||||
|
@ -44,7 +44,11 @@
|
||||
#include "pcm.h"
|
||||
#include "cd_cart.h"
|
||||
|
||||
#ifdef USE_DYNAMIC_ALLOC
|
||||
#define scd ext->cd_hw
|
||||
#else
|
||||
#define scd ext.cd_hw
|
||||
#endif
|
||||
|
||||
/* 5000000 SCD clocks/s = ~3184 clocks/line with a Master Clock of 53.693175 MHz */
|
||||
/* This would be slightly (~30 clocks) more on PAL systems because of the slower */
|
||||
|
@ -41,7 +41,11 @@
|
||||
|
||||
#include "shared.h"
|
||||
|
||||
external_t ext; /* External Hardware (Cartridge, CD unit, ...) */
|
||||
#ifdef USE_DYNAMIC_ALLOC
|
||||
external_t *ext;
|
||||
#else /* External Hardware (Cartridge, CD unit, ...) */
|
||||
external_t ext;
|
||||
#endif
|
||||
uint8 boot_rom[0x800]; /* Genesis BOOT ROM */
|
||||
uint8 work_ram[0x10000]; /* 68K RAM */
|
||||
uint8 zram[0x2000]; /* Z80 RAM */
|
||||
|
@ -54,7 +54,11 @@ typedef union
|
||||
} external_t;
|
||||
|
||||
/* Global variables */
|
||||
#ifdef USE_DYNAMIC_ALLOC
|
||||
extern external_t *ext;
|
||||
#else
|
||||
extern external_t ext;
|
||||
#endif
|
||||
extern uint8 boot_rom[0x800];
|
||||
extern uint8 work_ram[0x10000];
|
||||
extern uint8 zram[0x2000];
|
||||
|
Loading…
Reference in New Issue
Block a user