mori0091 / libmsx

C library for MSX
https://mori0091.github.io/libmsx/
MIT License
31 stars 2 forks source link

vmem_write() doesn't work correctly in MSX1 #55

Closed mori0091 closed 1 year ago

mori0091 commented 1 year ago

Describe the bug vmem_write() seems buggy in MSX1.

To Reproduce Run MSX1 application such as sample/hello on openmsx with C-BIOS_MSX1_JP. That shows that the VRAM contents is broken.

Expected behavior vmem_write() works correctly.

Development environment (please complete the following information):

Target Platform

Additional context See also issue #50 and PRs related to it. The enhancement of that (i.e. vmem_write_chunk() ) causes this problem.

But this problem seems not occured on WebMSX. Maybe VRAM access timing issue?

mori0091 commented 1 year ago

I found the reason. At least in case of MSX1 (i.e. TMS9918 VDP), it needs some wait for VRAM access. Oops. https://www.msx.org/wiki/VRAM_access_speed