mirror of
https://github.com/libretro/FBNeo.git
synced 2024-12-13 20:52:26 +00:00
add device for Atari EA ROM
This commit is contained in:
parent
955b84f2e5
commit
3d9aae8d72
@ -91,7 +91,7 @@ endif
|
||||
depobj = burn.o burn_gun.o burn_led.o burn_shift.o burn_memory.o burn_pal.o burn_sound.o burn_sound_c.o cheat.o debug_track.o hiscore.o load.o \
|
||||
tilemap_generic.o tiles_generic.o timer.o vector.o \
|
||||
\
|
||||
6821pia.o 8255ppi.o 8257dma.o c169.o avgdvg.o bsmt2000.o decobsmt.o eeprom.o gaelco_crypt.o joyprocess.o nb1414m4.o nb1414m4_8bit.o nmk004.o nmk112.o kaneko_tmap.o mathbox.o mb87078.o \
|
||||
6821pia.o 8255ppi.o 8257dma.o c169.o avgdvg.o bsmt2000.o decobsmt.o earom.o eeprom.o gaelco_crypt.o joyprocess.o nb1414m4.o nb1414m4_8bit.o nmk004.o nmk112.o kaneko_tmap.o mathbox.o mb87078.o \
|
||||
mermaid.o namco_c45.o namcoio.o pandora.o resnet.o seibusnd.o sknsspr.o slapstic.o st0020.o t5182.o timekpr.o tms34061.o v3021.o vdc.o tms9928a.o \
|
||||
watchdog.o \
|
||||
\
|
||||
|
64
src/burn/devices/earom.cpp
Normal file
64
src/burn/devices/earom.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
// Atari EA-ROM, impl. by dink
|
||||
|
||||
#include "burnint.h"
|
||||
#include "earom.h"
|
||||
|
||||
#define EAROM_SIZE 0x40
|
||||
static UINT8 earom_offset;
|
||||
static UINT8 earom_data;
|
||||
static UINT8 earom[EAROM_SIZE];
|
||||
|
||||
UINT8 earom_read(UINT16 /*address*/)
|
||||
{
|
||||
return (earom_data);
|
||||
}
|
||||
|
||||
void earom_write(UINT16 offset, UINT8 data)
|
||||
{
|
||||
earom_offset = offset;
|
||||
earom_data = data;
|
||||
}
|
||||
|
||||
void earom_ctrl_write(UINT16 /*offset*/, UINT8 data)
|
||||
{
|
||||
if (data & 0x01)
|
||||
earom_data = earom[earom_offset];
|
||||
if ((data & 0x0c) == 0x0c) {
|
||||
earom[earom_offset] = earom_data;
|
||||
}
|
||||
}
|
||||
|
||||
void earom_reset()
|
||||
{
|
||||
earom_offset = 0;
|
||||
earom_data = 0;
|
||||
}
|
||||
|
||||
void earom_init()
|
||||
{
|
||||
memset(&earom, 0, sizeof(earom));
|
||||
earom_reset();
|
||||
}
|
||||
|
||||
void earom_exit()
|
||||
{
|
||||
// N/A
|
||||
}
|
||||
|
||||
void earom_scan(INT32 nAction, INT32 *pnMin)
|
||||
{
|
||||
if (nAction & ACB_VOLATILE) {
|
||||
SCAN_VAR(earom_offset);
|
||||
SCAN_VAR(earom_data);
|
||||
}
|
||||
|
||||
if (nAction & ACB_NVRAM) {
|
||||
struct BurnArea ba;
|
||||
|
||||
memset(&ba, 0, sizeof(ba));
|
||||
ba.Data = earom;
|
||||
ba.nLen = sizeof(earom);
|
||||
ba.szName = "NV RAM";
|
||||
BurnAcb(&ba);
|
||||
}
|
||||
}
|
9
src/burn/devices/earom.h
Normal file
9
src/burn/devices/earom.h
Normal file
@ -0,0 +1,9 @@
|
||||
// Atari EA-ROM, impl. by dink
|
||||
|
||||
UINT8 earom_read(UINT16 /*address*/);
|
||||
void earom_write(UINT16 offset, UINT8 data);
|
||||
void earom_ctrl_write(UINT16 /*offset*/, UINT8 data);
|
||||
void earom_reset();
|
||||
void earom_init();
|
||||
void earom_exit();
|
||||
void earom_scan(INT32 nAction, INT32 *pnMin);
|
Loading…
Reference in New Issue
Block a user