Annotation of nono/vm/romimg_x68k.cpp, revision 1.1.1.4

1.1       root        1: //
                      2: // nono
1.1.1.2   root        3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
                      7: #include "romimg_x68k.h"
                      8: #include "cgrom.h"
                      9: #include "mainapp.h"
                     10: #include "pluto.h"
                     11: #include "scheduler.h"
                     12: 
1.1.1.3   root       13: std::unique_ptr<CGROMDevice> gCGROM;
                     14: std::unique_ptr<IPLROM1Device> gIPLROM1;
                     15: std::unique_ptr<IPLROM2Device> gIPLROM2;
                     16: 
1.1       root       17: //
                     18: // IPLROM(1)
                     19: //
                     20: 
                     21: IPLROM1Device::IPLROM1Device()
                     22: {
                     23:        devname = "IPLROM(1)";
                     24:        devaddr = 0xfe0000;
                     25:        devlen  = 0x020000;
                     26:        mask = devlen - 1;
                     27: }
                     28: 
                     29: IPLROM1Device::~IPLROM1Device()
                     30: {
                     31: }
                     32: 
                     33: bool
                     34: IPLROM1Device::Init()
                     35: {
                     36:        std::string name;
                     37: 
                     38:        if (gMainApp.benchmark_mode != 0) {
                     39:                name = string_format("BENCH%02d.ROM", gMainApp.benchmark_mode);
                     40:        } else {
                     41:                name = "IPLROM30.DAT";
                     42:        }
                     43: 
                     44:        if (LoadROM(name.c_str(), 128 * 1024) == false) {
                     45:                return false;
                     46:        }
                     47:        return true;
                     48: }
                     49: 
                     50: 
                     51: //
                     52: // IPLROM(2)
                     53: //
                     54: 
                     55: IPLROM2Device::IPLROM2Device()
                     56: {
                     57:        devname = "IPLROM(2)";
                     58:        devaddr = 0xfc0000;
                     59:        devlen  = 0x020000;
                     60:        mask = devlen - 1;
                     61: }
                     62: 
                     63: IPLROM2Device::~IPLROM2Device()
                     64: {
                     65: }
                     66: 
                     67: bool
                     68: IPLROM2Device::Init()
                     69: {
                     70:        if (gMainApp.benchmark_mode != 0) {
                     71:                return true;
                     72:        }
                     73: 
                     74:        if (LoadROM("ROM30.DAT", 128 * 1024) == false) {
                     75:                return false;
                     76:        }
                     77:        return true;
                     78: }
                     79: 
                     80: 
                     81: //
                     82: // CGROM
                     83: //
                     84: 
                     85: CGROMDevice::CGROMDevice()
                     86: {
                     87:        devname = "CGROM";
                     88:        devaddr = 0xf00000;
                     89:        devlen  = 768 * 1024;
                     90:        mask = 1024 * 1024 - 1;
                     91: }
                     92: 
                     93: CGROMDevice::~CGROMDevice()
                     94: {
                     95: }
                     96: 
                     97: bool
                     98: CGROMDevice::Init()
                     99: {
                    100: #if 0
                    101:        mem = builtin_cgrom;
                    102: #else
                    103:        if (LoadROM("CGROM30.DAT", 768 * 1024) == false) {
                    104:                return false;
                    105:        }
                    106: #endif
                    107:        return true;
                    108: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.