--- nono/vm/bitmap.cpp 2026/04/29 17:04:31 1.1.1.3 +++ nono/vm/bitmap.cpp 2026/04/29 17:04:35 1.1.1.4 @@ -1,6 +1,7 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #include "bitmap.h" @@ -349,8 +350,8 @@ BitmapDevice::MonitorUpdate() // 012345 // $0:RGB const uint8 *pal = gBT454->reg.color; - monitor.Print(29, 1, ""); - monitor.Print(32, 2, "RGB RGB"); + monitor.Puts(29, 1, ""); + monitor.Puts(32, 2, "RGB RGB"); for (i = 0; i < 16; i++) { uint rgb = ((pal[i * 3 + 0] & 0xf0) << 4) + @@ -646,8 +647,8 @@ BitmapDevice::EmuConsoleUpdate() uint32 ch0 = text[y * screen_w + x]; uint32 ch1 = text[y * screen_w + x + 1]; // その文字のフォントデータ上でのオフセット - uint32 fo0 = 0x3d000 + (ch0 & 0xff) * 48; - uint32 fo1 = 0x3d000 + (ch1 & 0xff) * 48; + const uint8 * const fo0 = BuiltinCGROM::Get12x24(ch0 & 0xff); + const uint8 * const fo1 = BuiltinCGROM::Get12x24(ch1 & 0xff); // 1,2文字目なら true、3,4文字目なら false bool evenpair = ((x & 2) == 0); @@ -659,8 +660,8 @@ BitmapDevice::EmuConsoleUpdate() for (int i = 0; i < 24; i++) { // その文字のフォントデータ - uint32 fdat0 = be16toh(*(uint16*)(&builtin_cgrom[fo0 + i * 2])); - uint32 fdat1 = be16toh(*(uint16*)(&builtin_cgrom[fo1 + i * 2])); + uint32 fdat0 = be16toh(*(const uint16*)(fo0 + i * 2)); + uint32 fdat1 = be16toh(*(const uint16*)(fo1 + i * 2)); // 属性はとりあえず反転のみサポート if ((ch0 & TA::On)) {