Started connecting ATI Rage

This commit is contained in:
dingusdev 2020-03-27 12:43:29 -07:00
parent 17200d5f35
commit f50f719b02
4 changed files with 23 additions and 4 deletions

View File

@ -22,17 +22,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <atirage.h>
#include <cstdint>
#include "endianswap.h"
#include <thirdparty/loguru/loguru.hpp>
ATIRage::ATIRage() {
}
uint32_t ATIRage::read() {
uint32_t ATIRage::read(int reg, int size) {
LOG_F(INFO, "Reading reg=%X, size %d", reg, (size * 8));
}
uint32_t ATIRage::write() {
uint32_t ATIRage::write(int reg, uint32_t value, int size) {
LOG_F(INFO, "Writing reg=%X, value=%X, size %d", reg, value, (size * 8));
}
void ATIRage::atirage_init() {

View File

@ -6,7 +6,13 @@ using namespace std;
/** Mach registers offsets. */
enum {
ATI_DSP_CONFIG = 0x0020, /*memory buffer registers*/
ATI_CTRC_H_TOTAL_DISP = 0x0000,
ATI_CRTC_H_SYNC_STRT_WID = 0x0004,
ATI_CTRC_V_TOTAL_DISP = 0x0008,
ATI_CRTC_V_SYNC_STRT_WID = 0x000C,
ATI_CTRC_INT_CNTL = 0x0018,
ATI_CTRC_GEN_CNTL = 0x001C,
ATI_DSP_CONFIG = 0x0020,
ATI_DSP_TOGGLE = 0x0024,
ATI_TIMER_CFG = 0x0028,
ATI_MEM_BUF_CNTL = 0x002C,

View File

@ -26,6 +26,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "viacuda.h"
#include "awacs.h"
#include "dbdma.h"
#include "atirage.h"
#include "machines/machinebase.h"
/** Heathrow Mac I/O device emulation.
@ -42,6 +43,8 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow")
this->viacuda = new ViaCuda();
gMachineObj->add_subdevice("ViaCuda", this->viacuda);
this->atirage = new ATIRage();
this->screamer = new AWACDevice();
this->snd_out_dma = new DMAChannel(this->screamer);
this->screamer->set_dma_out(this->snd_out_dma);
@ -128,6 +131,9 @@ uint32_t HeathrowIC::read(uint32_t offset, int size)
case 8:
res = dma_read(offset - 0x8000, size);
break;
case 0x12:
res = this->atirage->read(offset - 0x12000, size);
break;
case 0x14:
res = this->screamer->snd_ctrl_read(offset - 0x14000, size);
break;
@ -160,6 +166,9 @@ void HeathrowIC::write(uint32_t offset, uint32_t value, int size)
case 8:
dma_write(offset - 0x8000, value, size);
break;
case 0x12:
this->atirage->write(offset - 0x12000, value, size);
break;
case 0x14:
this->screamer->snd_ctrl_write(offset - 0x14000, value, size);
break;

View File

@ -61,6 +61,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "nvram.h"
#include "awacs.h"
#include "dbdma.h"
#include "atirage.h"
/**
Heathrow ASIC emulation
@ -134,6 +135,7 @@ private:
ViaCuda *viacuda; /* VIA cell with Cuda MCU attached to it */
NVram *nvram; /* NVRAM cell */
AWACDevice *screamer; /* Screamer audio codec instance */
ATIRage *atirage; /* Screamer audio codec instance */
DMAChannel *snd_out_dma;
};