From ec8d46ae61fcccf34cf281ee0606584c620c5522 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Thu, 18 Feb 2021 19:04:46 +0100 Subject: [PATCH 1/2] Fix memory size on the ht216 pb410a card. --- src/video/vid_ht216.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index d2c380527..59229a4eb 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -1303,7 +1303,7 @@ v7_vga_1024i_init(const device_t *info) static void * ht216_pb410a_init(const device_t *info) { - ht216_t *ht216 = ht216_init(info, device_get_config_int("memory") << 10, 0); + ht216_t *ht216 = ht216_init(info, 1 << 20, 0); return ht216; } From fb167f6f98a04778b123f2f570875da0abd749d6 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Thu, 18 Feb 2021 19:07:57 +0100 Subject: [PATCH 2/2] Improved code style as well as fixed the video memory size on the ht216-32 (pb410a). --- src/video/vid_ht216.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/video/vid_ht216.c b/src/video/vid_ht216.c index 59229a4eb..d7ecacc64 100644 --- a/src/video/vid_ht216.c +++ b/src/video/vid_ht216.c @@ -1016,11 +1016,10 @@ ht216_write(uint32_t addr, uint8_t val, void *p) addr &= svga->banked_mask; addr = (addr & 0x7fff) + ht216->write_banks[(addr >> 15) & 1]; - if (!ht216->ht_regs[0xcd] && !ht216->ht_regs[0xfe] && !ht216->ht_regs[0xf3]) { + if (!ht216->ht_regs[0xcd] && !ht216->ht_regs[0xfe] && !ht216->ht_regs[0xf3]) svga_write_linear(addr, val, svga); - } else { + else ht216_write_common(ht216, addr, val); - } }