void PC80S31K::initialize() { // init memory memset(rom, 0xff, sizeof(rom)); memset(ram, 0, sizeof(ram)); memset(rdmy, 0xff, sizeof(rdmy)); // load rom image FILEIO* fio = new FILEIO(); if(fio->Fopen(create_local_path(_T("PC88.ROM")), FILEIO_READ_BINARY)) { fio->Fseek(0x14000, FILEIO_SEEK_CUR); fio->Fread(rom, sizeof(rom), 1); fio->Fclose(); } else if(fio->Fopen(create_local_path(_T("DISK.ROM")), FILEIO_READ_BINARY)) { fio->Fread(rom, sizeof(rom), 1); fio->Fclose(); } else { // stop cpu d_cpu->write_signal(SIG_CPU_BUSREQ, 1, 1); } delete fio; // init memory map SET_BANK(0x0000, 0x1fff, wdmy, rom); SET_BANK(0x2000, 0x3fff, wdmy, rdmy); SET_BANK(0x4000, 0x7fff, ram, ram); SET_BANK(0x8000, 0xffff, wdmy, rdmy); // XM8 version 1.20 // both drives always set force ready signal d_fdc->write_signal(SIG_UPD765A_FREADY, 1, 1); }
void MEMORY::initialize() { memset(ram, 0, sizeof(ram)); memset(ext, 0, sizeof(ext)); memset(vram, 0, sizeof(vram)); memset(ipl, 0xff, sizeof(ipl)); memset(cart, 0xff, sizeof(cart)); memset(rdmy, 0xff, sizeof(rdmy)); // load ipl FILEIO* fio = new FILEIO(); if(fio->Fopen(emu->bios_path(_T("IPL.ROM")), FILEIO_READ_BINARY)) { fio->Fread(ipl, sizeof(ipl), 1); fio->Fclose(); } delete fio; // set memory map SET_BANK(0x0000, 0x1fff, wdmy, ipl ); SET_BANK(0x2000, 0x5fff, wdmy, cart); SET_BANK(0x6000, 0xafff, ext, ext ); SET_BANK(0xb000, 0xefff, ram, ram ); SET_BANK(0xf000, 0xffff, wdmy, rdmy); for(int i = 0; i < 6; i++) { vbank[i] = vram + 0x2000 * i; } rpage = wpage = 0; }
void MEMORY::close_cart() { memset(cart, 0xff, sizeof(cart)); // set memory map SET_BANK(0x0000, 0x1fff, ram + 0x0000, ipl); SET_BANK(0x2000, 0x3fff, ram + 0x2000, rdmy); SET_BANK(0x4000, 0xffff, ram + 0x4000, ram + 0x4000); }
void MEMORY::update_bank() { if(!(mcr2 & 1)) { // $c0000-$cffff: vram SET_BANK(0xc0000, 0xcffff, wdmy, rdmy); int bank = 0x8000 * ((dcr1 >> 10) & 3); SET_BANK(0xc0000, 0xc7fff, vram + bank, vram + bank); SET_BANK(0xc8000, 0xc8fff, cvram, cvram); SET_BANK(0xca000, 0xcafff, kvram, kvram); }
void MEMORY::write_signal(int id, uint32 data, uint32 mask) { // from PIO-P6 if(data & mask) { SET_BANK(0x0000, 0x3fff, ram, ram); } else { // ROM SET_BANK(0x0000, 0x1fff, ram + 0x0000, ipl); SET_BANK(0x2000, 0x3fff, ram + 0x2000, rdmy); } }
void MEMORY::initialize() { // load ipl memset(rdmy, 0xff, sizeof(rdmy)); load_ipl(); // init memory map SET_BANK(0x0000, 0x7fff, ram + 0x0000, rom + 0x0000); SET_BANK(0x8000, 0xffff, ram + 0x8000, ram + 0x8000); vram_ptr = 0; vram_data = memmap = 0; }
static void __init fixup_graphicsmaster(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK( 0, 0xc0000000, 16*1024*1024 ); mi->nr_banks = 1; SET_BANK( 1, 0xc8000000, 16*1024*1024 ); mi->nr_banks = 2; ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 ); }
void MEMORY::initialize() { memset(rom, 0xff, sizeof(rom)); memset(rdmy, 0xff, sizeof(rdmy)); // load rom image FILEIO* fio = new FILEIO(); if(fio->Fopen(emu->bios_path(_T("BASIC.ROM")), FILEIO_READ_BINARY)) { fio->Fread(rom, sizeof(rom), 1); fio->Fclose(); } delete fio; // set memory map #ifdef _MAP1010 SET_BANK(0x0000, 0x5fff, wdmy, rom ); SET_BANK(0x6000, 0x77ff, vram, vram); SET_BANK(0x7800, 0x7fff, wdmy, rdmy); SET_BANK(0x8000, 0xffff, ram, ram ); #else SET_BANK(0x0000, 0x5fff, wdmy, rom ); SET_BANK(0x6000, 0x77ff, vram, vram); SET_BANK(0x7800, 0xbfff, wdmy, rdmy); SET_BANK(0xc000, 0xffff, ram, ram ); #endif }
static void __init fixup_simpad(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { #ifdef CONFIG_SA1100_SIMPAD_DRAM_64MB /* DRAM */ SET_BANK( 0, 0xc0000000, 64*1024*1024 ); #else SET_BANK( 0, 0xc0000000, 32*1024*1024 ); #endif mi->nr_banks = 1; ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( __phys_to_virt(0xc0800000), 4*1024*1024 ); }
void MEMORY::open_cart(_TCHAR* file_path) { FILEIO* fio = new FILEIO(); if(fio->Fopen(file_path, FILEIO_READ_BINARY)) { memset(cart, 0xff, sizeof(cart)); fio->Fread(cart, sizeof(cart), 1); fio->Fclose(); } delete fio; // set memory map SET_BANK(0x0000, 0x7fff, wdmy, cart); SET_BANK(0x8000, 0xffff, ram + 0x8000, ram + 0x8000); }
void MEMORY::write_io8(uint32 addr, uint32 data) { memmap = data; if(memmap & 4) { vm->reset(); } if(memmap & 2) { SET_BANK(0x0000, 0x7fff, ram, ram); } else { SET_BANK(0x0000, 0x7fff, ram, rom); } // to 8255-2 port-c, bit2 d_pio2->write_signal(SIG_I8255_PORT_C, (memmap & 2) ? 4 : 0, 4); }
static void __init fixup_jornada720(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK( 0, 0xc0000000, 32*1024*1024 ); mi->nr_banks = 1; }
void MAIN::reset() { SET_BANK(0x0000, 0x8fff, ram, rom); slot_sel = 0; intr_mask = intr_req = 0; }
void MEMORY::initialize() { // init memory memset(ram, 0, sizeof(ram)); memset(vram, 0, sizeof(vram)); memset(cvram, 0, sizeof(cvram)); memset(kvram, 0, sizeof(kvram)); memset(ipl, 0xff, sizeof(ipl)); memset(kanji16, 0xff, sizeof(kanji16)); memset(rdmy, 0xff, sizeof(rdmy)); // load rom image FILEIO* fio = new FILEIO(); if(fio->Fopen(emu->bios_path(_T("IPL.ROM")), FILEIO_READ_BINARY)) { fio->Fread(ipl, sizeof(ipl), 1); fio->Fclose(); } else { // load pseudo ipl memcpy(ipl + 0xc000, bios1, sizeof(bios1)); memcpy(ipl + 0xfff0, bios2, sizeof(bios2)); // ank8/16 if(fio->Fopen(emu->bios_path(_T("ANK8.ROM")), FILEIO_READ_BINARY)) { fio->Fread(ipl, 0x800, 1); fio->Fclose(); } if(fio->Fopen(emu->bios_path(_T("ANK16.ROM")), FILEIO_READ_BINARY)) { fio->Fread(ipl + 0x800, 0x1000, 1); fio->Fclose(); } } if(fio->Fopen(emu->bios_path(_T("KANJI16.ROM")), FILEIO_READ_BINARY)) { fio->Fread(kanji16, sizeof(kanji16), 1); fio->Fclose(); } delete fio; // set memory SET_BANK(0x000000, 0xffffff, wdmy, rdmy); SET_BANK(0x000000, sizeof(ram) - 1, ram, ram); SET_BANK(0xff0000, 0xffffff, wdmy, ipl); // register event register_frame_event(this); }
void MEMORY::initialize() { memset(cart, 0xff, sizeof(cart)); memset(ipl, 0xff, sizeof(ipl)); memset(ram, 0, sizeof(ram)); memset(rdmy, 0xff, sizeof(rdmy)); // load ipl FILEIO* fio = new FILEIO(); if(fio->Fopen(emu->bios_path(_T("SF7000.ROM")), FILEIO_READ_BINARY)) { fio->Fread(ipl, sizeof(ipl), 1); fio->Fclose(); } delete fio; // set memory map SET_BANK(0x0000, 0x1fff, ram + 0x0000, ipl); SET_BANK(0x2000, 0x3fff, ram + 0x2000, rdmy); SET_BANK(0x4000, 0xffff, ram + 0x4000, ram + 0x4000); }
static void __init fixup_csb226(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK (0, 0xa0000000, 64*1024*1024); mi->nr_banks = 1; #if 0 setup_ramdisk (1, 0, 0, 8192); setup_initrd (__phys_to_virt(0xa1000000), 4*1024*1024); ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); #endif }
void MAIN::write_io8(uint32 addr, uint32 data) { switch(addr & 0xffe0) { case 0xff00: case 0xff20: case 0xff40: case 0xff60: slot_sel = (slot_sel & 1) | ((data << 1) & 6); break; case 0xff80: if((intr_mask & 0x80) != (data & 0x80)) { intr_mask = (intr_mask & (~0x80)) | (data & 0x80); d_sub->write_signal(SIG_SUB_INT2, data, 0x80); } if((intr_mask & 0x1f) != (data & 0x1f)) { intr_mask = (intr_mask & (~0x1f)) | (data & 0x1f); update_intr(); } break; case 0xffa0: if(data & 2) { SET_BANK(0x0000, 0x8fff, ram, ram); } else { SET_BANK(0x0000, 0x8fff, ram, rom); } slot_sel = (slot_sel & 6) | (data & 1); break; case 0xffc0: d_sub->write_signal(SIG_SUB_COMM, data, 0xff); break; case 0xffe0: break; default: d_slot[slot_sel & 7]->write_io8(addr, data); break; } }
void MAIN::initialize() { memset(rom, 0xff, sizeof(rom)); memset(rdmy, 0xff, sizeof(rdmy)); FILEIO* fio = new FILEIO(); if(fio->Fopen(emu->bios_path(_T("BASIC.ROM")), FILEIO_READ_BINARY)) { fio->Fread(rom, sizeof(rom), 1); fio->Fclose(); } delete fio; SET_BANK(0x0000, 0xffff, ram, ram); }
static void __init fixup_victor(struct machine_desc *desc, struct param_struct *params, char **cmdline, struct meminfo *mi) { SET_BANK( 0, 0xc0000000, 4*1024*1024 ); mi->nr_banks = 1; ROOT_DEV = MKDEV( 60, 2 ); /* Get command line parameters passed from the loader (if any) */ if( *((char*)0xc0000000) ) strcpy( *cmdline, ((char *)0xc0000000) ); /* power off if any problem */ strcat( *cmdline, " panic=1" ); }