int InitialiseMemory() { if (LoadRom(CRom,0x1000,"roms/characters.901460-03.bin")) return 1; if (LoadRom(BRom,0x2000,"roms/basic.901486-01.bin")) return 1; if (LoadRom(KRom,0x2000,"roms/kernal.901486-07.bin")) return 1; #if 1 // if (LoadRom(D20,0x2002,"roms/Donkey Kong-2000.prg")) // return 1; // if (LoadRom(DA0,0x2002,"roms/Donkey Kong-A000.prg")) // return 1; #else // if (LoadRom(D60,0x2002,"roms/Lode Runner.60")) // return 1; // if (LoadRom(DA0,0x2002,"roms/Lode Runner.a0")) // return 1; // if (LoadRom(DA0,0x2002,"roms/solarsystem.a0")) // return 1; if (LoadRom(DA0,0x2002,"roms/Cosmic Cruncher (1982)(Commodore).a0")) return 1; // if (LoadRom(DA0,0x2002,"roms/Omega Race (1982)(Commodore).a0")) // return 1; // if (LoadRom(DA0,0x2002,"roms/Arcadia (19xx)(-).a0")) // return 1; #endif return 0; }
int DISK_InitialiseMemory() { #if 1 if (LoadRom(DiskRomLo,0x2000,"roms/1540-c000.325302-01.bin")) return 1; if (LoadRom(DiskRomHi,0x2000,"roms/1540-e000.325303-01.bin")) return 1; #else if (LoadRom(combinedRom,0x4000,"roms/dos1541")) return 1; memcpy(DiskRomLo,combinedRom,0x2000); memcpy(DiskRomHi,combinedRom+0x2000,0x2000); #endif #if USE_DRW_IMAGE if (LoadRom(DiskData,252004,"disks/vicdemos3b.drw")) return 1; #else if (LoadRom(DiskData,333744,"disks/party.g64")) return 1; #endif if (curTrack<0) { MoveHead(1); // Initialise DISK } return 0; }
int InitialiseMemory() { if (LoadRom(0x0000,0x0800,"roms/invaders/invaders.h")) return 1; if (LoadRom(0x0800,0x0800,"roms/invaders/invaders.g")) return 1; if (LoadRom(0x1000,0x0800,"roms/invaders/invaders.f")) return 1; if (LoadRom(0x1800,0x0800,"roms/invaders/invaders.e")) return 1; // Blank video and ram for now - real hardware probably doesn't do this though! memset(&Ram[0],0,256*32); memset(&RamCmp[0],0,256*32); return 0; }
//============================================================================= // eRom::Init //----------------------------------------------------------------------------- void eRom::Init() { #if defined(USE_EMBEDDED_RESOURCES) || defined(USE_EXTERN_RESOURCES) memcpy(memory->Get(ROM_128_0), sos128_0, eMemory::PAGE_SIZE); memcpy(memory->Get(ROM_128_1), sos128_1, eMemory::PAGE_SIZE); memcpy(memory->Get(ROM_48), sos48, eMemory::PAGE_SIZE); memcpy(memory->Get(ROM_SYS), service, eMemory::PAGE_SIZE); memcpy(memory->Get(ROM_DOS), dos513f, eMemory::PAGE_SIZE); #else//USE_EMBEDDED_RESOURCES LoadRom(ROM_128_0, xIo::ResourcePath("res/rom/sos128_0.rom")); LoadRom(ROM_128_1, xIo::ResourcePath("res/rom/sos128_1.rom")); LoadRom(ROM_48, xIo::ResourcePath("res/rom/sos48.rom")); LoadRom(ROM_SYS, xIo::ResourcePath("res/rom/service.rom")); LoadRom(ROM_DOS, xIo::ResourcePath("res/rom/dos513f.rom")); #endif//USE_EMBEDDED_RESOURCES }
psx4Qt::psx4Qt(QWidget *parent) : QMainWindow(parent) { QThread::currentThread()->setPriority( QThread::NormalPriority ); showFullScreen(); //create button widgets dpad = new DPadWidget( this ); dpad->setGeometry(QRect(0, 0, 128, 360)); dpad->show(); connect(dpad, SIGNAL(showMenu()), this, SLOT( showAntSnesMenu()) ); connect(dpad, SIGNAL(virtualKeyEvent(quint32, bool)), this, SLOT( virtualKeyEvent(quint32, bool)) ); widget = new QBlitterWidget(); widget->setObjectName(QString::fromUtf8("QBlitterWidget")); widget->setGeometry(QRect(160, 0, 640, 360)); adaptation = new psxadaptation( widget ); // ui.menuButton->setEditFocus(false); //connect buttons from the ui // connect(ui.menuButton, SIGNAL(clicked()), this, SLOT( showAntSnesMenu()) ); //the widget cam be repainted with repaint or update commands //widget->repaint(); //TODO: use Qt::QueuedConnection in here? connect(this, SIGNAL(Start()), widget, SLOT(startDSA()) ); connect(this, SIGNAL(Stop()), widget, SLOT(stopDSA()) ); connect(this, SIGNAL(Start()), adaptation, SLOT(Start()) ); connect(this, SIGNAL(Stop()), adaptation, SLOT(Stop()) ); //connect all adaptation stuff connect(this, SIGNAL(doLoadROM(QString,TPsxSettings)), adaptation, SLOT(LoadRom(QString,TPsxSettings)) ); connect(this, SIGNAL(Start()), this, SLOT(listencontrols()) ); g_adaption = this; }
gpsp4Qt::gpsp4Qt(QWidget *parent) : QWidget(parent), m_buf(NULL), m_softKeys(0), m_hardKeys(0), m_errorDialog(NULL) { QWidget::setAttribute(Qt::WA_AcceptTouchEvents); QThread::currentThread()->setPriority( QThread::NormalPriority ); showFullScreen(); setFocusPolicy(Qt::StrongFocus); //create button widgets m_dpad = new DPadWidget( this ); connect(m_dpad, SIGNAL(showMenu()), this, SLOT( showAntSnesMenu()) ); m_rightButtons = new rightbuttonwidget( this ); m_audio = new CAntAudio(); m_adaptation = new gpspadaptation( this, m_audio ); //connect all adaptation stuff connect(this, SIGNAL(Start()), m_adaptation, SLOT(Start()) ); connect(this, SIGNAL(Stop()), m_adaptation, SLOT(Stop()) ); connect(this, SIGNAL(saveState(int)), m_adaptation, SLOT(savegpspState(int)) ); connect(this, SIGNAL(loadState(int)), m_adaptation, SLOT(loadgpspState(int)) ); connect(this, SIGNAL(resetgpsp()), m_adaptation, SLOT(ResetGame()) ); connect(this, SIGNAL(exitgpsp()), m_adaptation, SLOT(exitgpsp()) ); connect(this, SIGNAL(doLoadROM(QString,TGPSPSettings)), m_adaptation, SLOT(LoadRom(QString,TGPSPSettings)) ); connect(m_adaptation, SIGNAL(dispatchErrorNote(QString)), this, SLOT(showErrorNote(QString)) ); connect(this, SIGNAL(Start()), this, SLOT(listencontrols()) ); g_adaption = this; //create graphics for the button overlay LoadButtons(); }
AntSnesQt::AntSnesQt(QWidget *parent) : QWidget(parent), buf(NULL), iSnesKeys(0), iHardKeys(0) { // QMainWindow::setAttribute(Qt::WA_AcceptTouchEvents); //setBackgroundRole ( QPalette::Window ); //setAutoFillBackground ( true ); bitmapdata = new TUint8[256 * 240 * 2]; QWidget::setAttribute(Qt::WA_AcceptTouchEvents); QThread::currentThread()->setPriority( QThread::NormalPriority ); //ui.setupUi(this); showFullScreen(); setFocusPolicy(Qt::StrongFocus); // QGLWidget:setStyleSheet(" background: #111111;"); dpad = new DPadWidget( this ); buttons = new buttonwidget( this ); middlebutton = new MiddleButtons( this ); connect(middlebutton, SIGNAL(showMenu()), this, SLOT( showAntSnesMenu()) ); antaudio = new CAntAudio(); control = new QSnesController( this, antaudio, this ); connect(this, SIGNAL(Start()), control, SLOT(Start()) ); connect(this, SIGNAL(Stop()), control, SLOT(Stop()) ); connect(this, SIGNAL(Start()), this, SLOT(listencontrols()) ); connect(this, SIGNAL(doLoadROM( QString,TAntSettings)), control, SLOT(LoadRom(QString,TAntSettings)) ); //create graphics for the button overlay buttonOpacity = iAntSettings.iButtonOpacity; LoadButtons(); }
bool DSPCore_Init(const std::string& irom_filename, const std::string& coef_filename, bool bUsingJIT) { g_dsp.step_counter = 0; cyclesLeft = 0; init_hax = false; dspjit = nullptr; g_dsp.irom = (u16*)AllocateMemoryPages(DSP_IROM_BYTE_SIZE); g_dsp.iram = (u16*)AllocateMemoryPages(DSP_IRAM_BYTE_SIZE); g_dsp.dram = (u16*)AllocateMemoryPages(DSP_DRAM_BYTE_SIZE); g_dsp.coef = (u16*)AllocateMemoryPages(DSP_COEF_BYTE_SIZE); // Fill roms with zeros. memset(g_dsp.irom, 0, DSP_IROM_BYTE_SIZE); memset(g_dsp.coef, 0, DSP_COEF_BYTE_SIZE); // Try to load real ROM contents. if (!LoadRom(irom_filename, DSP_IROM_SIZE, g_dsp.irom) || !LoadRom(coef_filename, DSP_COEF_SIZE, g_dsp.coef) || !VerifyRoms(irom_filename, coef_filename)) { DSPCore_FreeMemoryPages(); return false; } memset(&g_dsp.r,0,sizeof(g_dsp.r)); for (int i = 0; i < 4; i++) { g_dsp.reg_stack_ptr[i] = 0; for (int j = 0; j < DSP_STACK_DEPTH; j++) { g_dsp.reg_stack[i][j] = 0; } } // Fill IRAM with HALT opcodes. for (int i = 0; i < DSP_IRAM_SIZE; i++) { g_dsp.iram[i] = 0x0021; // HALT opcode } // Just zero out DRAM. for (int i = 0; i < DSP_DRAM_SIZE; i++) { g_dsp.dram[i] = 0; } // Copied from a real console after the custom UCode has been loaded. // These are the indexing wrapping registers. g_dsp.r.wr[0] = 0xffff; g_dsp.r.wr[1] = 0xffff; g_dsp.r.wr[2] = 0xffff; g_dsp.r.wr[3] = 0xffff; g_dsp.r.sr |= SR_INT_ENABLE; g_dsp.r.sr |= SR_EXT_INT_ENABLE; g_dsp.cr = 0x804; gdsp_ifx_init(); // Mostly keep IRAM write protected. We unprotect only when DMA-ing // in new ucodes. WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false); // Initialize JIT, if necessary if (bUsingJIT) dspjit = new DSPEmitter(); core_state = DSPCORE_RUNNING; return true; }
int BurnXorRom(unsigned char *Dest,int i,int nGap) { return LoadRom(Dest,i,nGap,1); }
INT32 BurnXorRom(UINT8 *Dest, INT32 i, INT32 nGap) { return LoadRom(Dest,i,nGap,1); }