@@ -833,19 +833,34 @@ void a2_video_device::hgr_update(screen_device &screen, bitmap_ind16 &bitmap, co
833833 for (int row = beginrow; row <= endrow; row++)
834834 {
835835 unsigned const address = start_address + (((row/8 ) & 0x07 ) << 7 ) + (((row/8 ) & 0x18 ) * 5 ) + ((row & 7 ) << 10 );
836- uint8_t const *const vram_row = &m_ram_ptr[address];
837-
838- uint16_t words[40 ];
839-
840- unsigned last_output_bit = 0 ;
841-
842- for (int col = std::max (0 , startcol-1 ); col < std::min (stopcol+1 , 40 ); col++)
836+ static const uint16_t empty_words[40 ] =
843837 {
844- unsigned word = double_7_bits[vram_row[col] & 0x7f ];
845- if (vram_row[col] & bit7_mask)
846- word = (word * 2 + last_output_bit) & 0x3fff ;
847- words[col] = word;
848- last_output_bit = word >> 13 ;
838+ // empty RAM socket causes TTL input to float high
839+ 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff ,
840+ 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff ,
841+ 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff ,
842+ 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff ,
843+ 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff , 0x3fff
844+ };
845+ uint16_t ram_words[40 ];
846+ uint16_t *words;
847+
848+ if (address > m_ram_mask)
849+ words = (uint16_t *)empty_words;
850+ else
851+ {
852+ uint8_t const *const vram_row = &m_ram_ptr[address];
853+ unsigned last_output_bit = 0 ;
854+ words = ram_words;
855+
856+ for (int col = std::max (0 , startcol-1 ); col < std::min (stopcol+1 , 40 ); col++)
857+ {
858+ unsigned word = double_7_bits[vram_row[col] & 0x7f ];
859+ if (vram_row[col] & bit7_mask)
860+ word = (word * 2 + last_output_bit) & 0x3fff ;
861+ words[col] = word;
862+ last_output_bit = word >> 13 ;
863+ }
849864 }
850865
851866 if (rgb_monitor ())
0 commit comments