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

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

unix.superglobalmegacorp.com

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