// set vram pointer to gdc
d_gdc_chr->set_vram_ptr(tvram, 0x2000);
d_gdc_chr->set_screen_width(80);
+#if !defined(SUPPORT_HIRESO)
+ #if !defined(SUPPORT_2ND_VRAM)
d_gdc_gfx->set_vram_bus_ptr(this, 0x20000);
+ #else
+ d_gdc_gfx->set_vram_bus_ptr(this, 0x40000);
+ #endif
+#else
+ d_gdc_gfx->set_vram_bus_ptr(this, 0x80000);
+#endif
d_gdc_gfx->set_screen_width(SCREEN_WIDTH >> 3);
// register event
void DISPLAY::write_dma_io8(uint32_t addr, uint32_t data)
{
#if defined(SUPPORT_GRCG)
- if(grcg_mode & GRCG_CG_MODE) {
+ if(grcg_cg_mode) {
+// if(grcg_mode & GRCG_CG_MODE) {
#if defined(SUPPORT_EGC)
- if(modereg2[MODE2_EGC]) {
+ if(enable_egc) {
+// if(modereg2[MODE2_EGC]) {
+// out_debug_log(_T("ADDR = %08X"), addr);
egc_writeb(addr, data);
} else
#endif
+// out_debug_log(_T("ADDR = %08X"), addr);
grcg_writeb(addr, data);
return;
}
void DISPLAY::write_dma_io16(uint32_t addr, uint32_t data)
{
#if defined(SUPPORT_GRCG)
- if(grcg_mode & GRCG_CG_MODE) {
+ if(grcg_cg_mode) {
+// if(grcg_mode & GRCG_CG_MODE) {
#if defined(SUPPORT_EGC)
- if(modereg2[MODE2_EGC]) {
+ if(enable_egc) {
+// if(modereg2[MODE2_EGC]) {
egc_writew(addr, data);
} else
#endif
uint32_t DISPLAY::read_dma_io8(uint32_t addr)
{
#if defined(SUPPORT_GRCG)
- if(grcg_mode & GRCG_CG_MODE) {
+ if(grcg_cg_mode) {
+// if(grcg_mode & GRCG_CG_MODE) {
#if defined(SUPPORT_EGC)
- if(modereg2[MODE2_EGC]) {
+ if(enable_egc) {
+// if(modereg2[MODE2_EGC]) {
return egc_readb(addr);
}
#endif
uint32_t DISPLAY::read_dma_io16(uint32_t addr)
{
#if defined(SUPPORT_GRCG)
- if(grcg_mode & GRCG_CG_MODE) {
+ if(grcg_cg_mode) {
+// if(grcg_mode & GRCG_CG_MODE) {
#if defined(SUPPORT_EGC)
- if(modereg2[MODE2_EGC]) {
+ if(enable_egc) {
+// if(modereg2[MODE2_EGC]) {
return egc_readw(addr);
}
#endif
// post process
if(loading) {
+
+#if defined(SUPPORT_16_COLORS) && defined(SUPPORT_EGC)
+ is_use_egc = ((config.dipswitch & (1 << DIPSWITCH_POSITION_EGC)) != 0);
+ enable_egc = ((is_use_egc) && (modereg2[MODE2_EGC] != 0)) ? true : false;
+#endif
#if defined(SUPPORT_2ND_VRAM) && !defined(SUPPORT_HIRESO)
if(vram_disp_sel & 1) {
vram_disp_b = vram + 0x28000;
}
#endif
#if defined(SUPPORT_GRCG)
+ grcg_cg_mode = ((grcg_mode & GRCG_CG_MODE) != 0) ? true : false;
+ grcg_rw_mode = ((grcg_mode & GRCG_RW_MODE) != 0) ? true : false;
for(int i = 0; i < 4; i++) {
grcg_tile_word[i] = ((uint16_t)grcg_tile[i]) | ((uint16_t)grcg_tile[i] << 8);
}
wrote_bytes = 1;
// execute command
- if(!(vect[0] & 0x78)) {
+ if(!(vect[0] & 0x78)) { // R, C, T, L
pattern = ra[8] | (ra[9] << 8);
draw_pset(dx, dy);
}
- if(vect[0] & 0x08) {
+ if(vect[0] & 0x08) { // L (Line)
draw_vectl();
}
- if(vect[0] & 0x10) {
+ if(vect[0] & 0x10) { // T (Text)
draw_vectt();
}
- if(vect[0] & 0x20) {
+ if(vect[0] & 0x20) { // C (Circle)
draw_vectc();
}
- if(vect[0] & 0x40) {
+ if(vect[0] & 0x40) { // R (Rect)
draw_vectr();
}
reset_vect();
int vx2 = vectdir[dir][2];
int vy2 = vectdir[dir][3];
pattern = ra[8] | (ra[9] << 8);
-
+
+// out_debug_log(_T("VECTR D=%d D2=%d START=%d,%d VX1,VY1,VX2,VY2 = %d,%d,%d,%d"),
+// d, d1, dx, dy, vx1, vy1, vx2,vy2);
for(int i = 0; i < d; i++) {
draw_pset(dx, dy);
dx += vx1;
pattern = (pattern >> 1) | (dot << 15);
uint32_t addr = y * width + (x >> 3);
- if((_UPD7220_UGLY_PC98_HACK)) {
-// if(addr >= 0x8000) return;
-// if((y == 409) && (x >= 384)) return;
-// if(y > 409) return;
-// if((x < 0) || (y < 0) || (x >= (width << 3))) return;
-// addr = addr & 0x7fff;
- } else {
- //if((x < 0) || (y < 0) || (x >= (width << 3)) || (y >= height)) return;
- }
uint8_t bit;
if(_UPD7220_MSB_FIRST) {
bit = 0x80 >> (x & 7);