2011-04-24 01:14:00 +00:00
|
|
|
/**
|
|
|
|
** Supermodel
|
|
|
|
** A Sega Model 3 Arcade Emulator.
|
2011-09-14 19:08:43 +00:00
|
|
|
** Copyright 2011 Bart Trzynadlowski, Nik Henson
|
2011-04-24 01:14:00 +00:00
|
|
|
**
|
|
|
|
** This file is part of Supermodel.
|
|
|
|
**
|
|
|
|
** Supermodel is free software: you can redistribute it and/or modify it under
|
|
|
|
** the terms of the GNU General Public License as published by the Free
|
|
|
|
** Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
** any later version.
|
|
|
|
**
|
|
|
|
** Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
** more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License along
|
|
|
|
** with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SCSP.h
|
|
|
|
*
|
|
|
|
* Header file defining for SCSP emulation.
|
|
|
|
*/
|
2020-08-22 20:41:47 +00:00
|
|
|
#define MAX_SCSP 2
|
2011-04-24 01:14:00 +00:00
|
|
|
#ifndef INCLUDED_SCSP_H
|
|
|
|
#define INCLUDED_SCSP_H
|
|
|
|
|
|
|
|
|
2011-09-05 06:53:26 +00:00
|
|
|
void SCSP_w8(UINT32 addr,UINT8 val);
|
|
|
|
void SCSP_w16(UINT32 addr,UINT16 val);
|
|
|
|
void SCSP_w32(UINT32 addr,UINT32 val);
|
|
|
|
UINT8 SCSP_r8(UINT32 addr);
|
|
|
|
UINT16 SCSP_r16(UINT32 addr);
|
|
|
|
UINT32 SCSP_r32(UINT32 addr);
|
2011-04-24 01:14:00 +00:00
|
|
|
|
2011-07-31 02:37:31 +00:00
|
|
|
void SCSP_SetCB(int (*Run68k)(int cycles),void (*Int68k)(int irq));
|
2011-04-24 01:14:00 +00:00
|
|
|
void SCSP_Update();
|
2011-09-05 06:53:26 +00:00
|
|
|
void SCSP_MidiIn(UINT8);
|
|
|
|
void SCSP_MidiOutW(UINT8);
|
|
|
|
UINT8 SCSP_MidiOutFill();
|
|
|
|
UINT8 SCSP_MidiInFill();
|
2011-04-24 01:14:00 +00:00
|
|
|
void SCSP_CpuRunScanline();
|
2011-09-05 06:53:26 +00:00
|
|
|
UINT8 SCSP_MidiOutR();
|
2011-09-14 07:38:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SCSP_Init(n):
|
|
|
|
*
|
|
|
|
* Initializes the SCSPs, allocates internal memory, and creates a mutex for
|
|
|
|
* MIDI FIFO access. Call SCSP_SetCB() and SCSP_SetBuffers() before calling
|
|
|
|
* this.
|
|
|
|
*
|
|
|
|
* Parameters:
|
|
|
|
* n Number of SCSPs to create. Always use 2!
|
|
|
|
*
|
|
|
|
* Returns:
|
|
|
|
* FAIL if an error occured (prints own error messages), OKAY otherwise.
|
|
|
|
*/
|
2017-03-27 03:19:15 +00:00
|
|
|
bool SCSP_Init(const Util::Config::Node &config, int n);
|
2011-09-14 07:38:56 +00:00
|
|
|
|
2011-09-05 06:53:26 +00:00
|
|
|
void SCSP_SetRAM(int n,UINT8 *r);
|
2011-04-24 01:14:00 +00:00
|
|
|
void SCSP_RTECheck();
|
|
|
|
int SCSP_IRQCB(int);
|
|
|
|
|
2011-09-05 06:53:26 +00:00
|
|
|
void SCSP_Master_w8(UINT32 addr,UINT8 val);
|
|
|
|
void SCSP_Master_w16(UINT32 addr,UINT16 val);
|
|
|
|
void SCSP_Master_w32(UINT32 addr,UINT32 val);
|
|
|
|
void SCSP_Slave_w8(UINT32 addr,UINT8 val);
|
|
|
|
void SCSP_Slave_w16(UINT32 addr,UINT16 val);
|
|
|
|
void SCSP_Slave_w32(UINT32 addr,UINT32 val);
|
|
|
|
UINT8 SCSP_Master_r8(UINT32 addr);
|
|
|
|
UINT16 SCSP_Master_r16(UINT32 addr);
|
|
|
|
UINT32 SCSP_Master_r32(UINT32 addr);
|
|
|
|
UINT8 SCSP_Slave_r8(UINT32 addr);
|
|
|
|
UINT16 SCSP_Slave_r16(UINT32 addr);
|
|
|
|
UINT32 SCSP_Slave_r32(UINT32 addr);
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
// Supermodel interface functions
|
2011-08-09 18:36:29 +00:00
|
|
|
void SCSP_SaveState(CBlockFile *StateFile);
|
|
|
|
void SCSP_LoadState(CBlockFile *StateFile);
|
2011-04-24 01:14:00 +00:00
|
|
|
void SCSP_SetBuffers(INT16 *leftBufferPtr, INT16 *rightBufferPtr, int bufferLength);
|
|
|
|
void SCSP_Deinit(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif // INCLUDED_SCSP_H
|