// memset(tvram, 0, sizeof(tvram));
memset(vram, 0, sizeof(vram));
vram_draw = vram + 0x00000;
-
// WIP: MEMSW
bool memsw_stat = false;
if((config.dipswitch & (1 << DIPSWITCH_POSITION_NOINIT_MEMSW)) != 0) {
#endif
vram_draw = vram + 0x00000;
vram_bank = 0x00000;
-
+#if defined(USE_MONITOR_TYPE)
+ display_high = (config.monitor_type == 0) ? true : false; // OK?
+#else
+ display_high = false;
+#endif
crtv = 2;
scroll[SCROLL_PL ] = 0;
} else if(ch == SIG_DISPLAY98_SET_BANK) {
// WIP: Still dummy.
vram_bank = ((data & mask) != 0) ? 0x10000 : 0x00000;
- }
+ } /*else if(ch == SIG_DISPLAY98_HIGH_RESOLUTION) {
+ display_high = ((data & mask) != 0);
+ printf("DISP MODE=%d\n", display_high);
+ }*/
}
void DISPLAY::write_io8(uint32_t addr, uint32_t data)
if(_width > SCREEN_WIDTH) _width = SCREEN_WIDTH;
for(int y = 0; y < SCREEN_HEIGHT; y++) {
scrntype_t *dest = emu->get_screen_buffer(y);
- uint8_t *src_chr = screen_chr[y];
+ uint8_t *src_chr;
+#if defined(USE_MONITOR_TYPE) && !defined(SUPPORT_HIRESO)
+ if(display_high) {
+ src_chr = screen_chr[y];
+ } else {
+ src_chr = screen_chr[y >> 1];
+ }
+#else
+ src_chr = screen_chr[y];
+#endif
#if defined(SUPPORT_16_COLORS)
if(!modereg2[MDOE2_TXTSHIFT]) {
src_chr++;
}
int bl = scroll[SCROLL_BL] + pl + 1;
int cl = scroll[SCROLL_CL];
-#if defined(SUPPORT_HIRESO)
- bl <<= 1;
- cl <<= 1;
-#endif
int ssl = scroll[SCROLL_SSL];
int sur = scroll[SCROLL_SUR] & 31;
if(sur) {
gaiji1st = 0;
}
last = offset;
-
for(int l = 0; l < bl; l++) {
- int yy = y + l + pl;
+ int yy;
+ yy = y + l + pl;
if(yy >= ytop && yy < _height) {
uint8_t *dest = &screen_chr[yy][x];
#if !defined(SUPPORT_HIRESO)
- uint8_t pattern = (l < cl && l < FONT_HEIGHT) ? font[offset + l] : 0;
+ uint8_t pattern;
+#if defined(USE_MONITOR_TYPE) && !defined(SUPPORT_HIRESO)
+ if(!(display_high) && ((code >= 0x100) || (kanji2nd))) {
+ pattern = (l < cl && l < (FONT_HEIGHT >> 1)) ? (font[offset + (l << 1)] | font[offset + (l << 1) + 1]) : 0;
+ } else
+#endif
+ pattern = (l < cl && l < FONT_HEIGHT) ? font[offset + l] : 0;
#else
- uint16_t pattern = (l < cl && l < FONT_HEIGHT) ? *(uint16_t *)(&font[offset + l * 2]) : 0;
+ uint16_t pattern;
+ pattern = (l < cl && l < FONT_HEIGHT) ? *(uint16_t *)(&font[offset + l * 2]) : 0;
#endif
if(!(attr & ATTR_ST)) {
pattern = 0;
of++;
if(of >= __vramsize) break;
}
- if((cs_gfx[0] & 0x1f) == 1) {
+ if(((cs_gfx[0] & 0x1f) == 1) || !(display_high)){
// 200 line
if(modereg1[MODE1_200LINE]) {
//memset(dest, 0, 640);
#include "../../emu.h"
#include "../device.h"
-#define SIG_DISPLAY98_SET_PAGE_80 1
-#define SIG_DISPLAY98_SET_PAGE_A0 2
-#define SIG_DISPLAY98_SET_BANK 3
-
+#define SIG_DISPLAY98_SET_PAGE_80 1
+#define SIG_DISPLAY98_SET_PAGE_A0 2
+#define SIG_DISPLAY98_SET_BANK 3
+//#define SIG_DISPLAY98_HIGH_RESOLUTION 4
class UPD7220;
namespace PC9801 {
{
private:
DEVICE *d_pic;
- DEVICE *d_pio_sys;
DEVICE *d_pio_prn;
outputs_t output_gdc_freq;
__DECL_ALIGNED(16) static const uint8_t egc_bytemask_d1[8];
__DECL_ALIGNED(16) static const uint16_t egc_maskword[16][4];
#endif
-
+ bool display_high;
#if !defined(SUPPORT_HIRESO)
#define FONT_SIZE 16
#define FONT_WIDTH 8
d_gdc_gfx = device;
ra_gfx = ra; cs_gfx = cs;
}
- void set_context_pio_sys(DEVICE* device)
- {
- d_pio_sys = device;
- }
void set_context_pio_prn(DEVICE* device)
{
d_pio_prn = device;
display->set_context_gdc_chr(gdc_chr, gdc_chr->get_ra());
display->set_context_gdc_gfx(gdc_gfx, gdc_gfx->get_ra(), gdc_gfx->get_cs());
display->set_context_gdc_freq(pio_sys, SIG_I8255_PORT_A, 0x80);
- //display->set_context_pio_sys(pio_sys);
+ //pio_sys->set_context_port_b(display, SIG_DISPLAY98_HIGH_RESOLUTION, 0x08, 0); // SHUT1
//display->set_context_pio_prn(pio_prn);
dmareg->set_context_dma(dma);