Annotation of nono/wx/wxromwindow.cpp, revision 1.1.1.3

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2022 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: //
                      8: // ROM 種別を表示するウィンドウ
                      9: //
                     10: 
                     11: #include "wxromwindow.h"
                     12: #include "mainapp.h"
                     13: #include "prom.h"
                     14: #include "romimg_x68k.h"
                     15: 
                     16: // コンストラクタ
                     17: WXROMWindow::WXROMWindow(wxWindow *parent)
1.1.1.2   root       18:        : inherited(parent, wxID_ANY, "ROM")
1.1       root       19: {
                     20:        int row;
                     21: 
                     22:        // ROM はアプリケーション起動後に変化しないので、初回実行時に情報収集。
1.1.1.2   root       23:        if (gMainApp.IsX68030()) {
1.1       root       24:                row = 3;
                     25:        } else {
                     26:                row = 1;
                     27:        }
                     28: 
1.1.1.3 ! root       29:        auto panel = new WXTextScreen(this, nnSize(52, row));
1.1       root       30:        auto& screen = panel->GetScreen();
                     31: 
1.1.1.2   root       32:        if (gMainApp.IsX68030()) {
                     33:                const auto iplrom1 = GetIPLROM1Device();
                     34:                const auto iplrom2 = GetIPLROM2Device();
                     35:                const auto cgrom   = GetCGROMDevice();
                     36:                const char *iplrom1_filename = iplrom1->GetFilename();
                     37:                const char *iplrom2_filename = iplrom2->GetFilename();
                     38:                const char *cgrom_filename = cgrom->GetFilename();
1.1       root       39: 
                     40:                screen.Print(0, 0, "IPLROM1($fe0000-$ffffff,128KB): %s",
                     41:                        (iplrom1_filename ? "image file" : "Genuine IPLROM30.DAT"));
                     42:                screen.Print(0, 1, "IPLROM2($fc0000-$fdffff,128KB): %s",
                     43:                        (iplrom2_filename ? "image file" : "nono's builtin"));
                     44:                screen.Print(0, 2, "CGROM  ($f00000-$fbffff,768KB): %s",
                     45:                        (cgrom_filename ? "image file" : "nono's builtin"));
                     46:        } else {
1.1.1.2   root       47:                const auto prom = GetPROMDevice();
                     48:                const char *prom_filename = prom->GetFilename();
1.1       root       49: 
                     50:                screen.Print(0, 0, "PROM($41000000-): %s",
                     51:                        (prom_filename ? "image file" : "nono's builtin"));
                     52:        }
                     53: 
1.1.1.3 ! root       54:        Fit();
1.1       root       55: }
                     56: 
                     57: WXROMWindow::~WXROMWindow()
                     58: {
                     59: }

unix.superglobalmegacorp.com

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