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

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

unix.superglobalmegacorp.com

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