Why is so difficult the cross-development for MSX?

By [WYZ]

Champion (451)

[WYZ] さんの画像

29-08-2010, 14:55

From few days ago I'm tring to program a mini music demo, including a few VDP tricks.

I'll not continue with this program but may be somebody could extract ideas from this experiment or a test for emulators. It runs quite well on emulators but, as I suspected MSX hangs. Tongue

http://www.mediafire.com/?cl7y5educc9to4b

http://www.mediafire.com/?6eoybe8yg87234d

ログイン/登録して投稿

By hap

Paragon (2042)

hap さんの画像

29-08-2010, 18:13

There's a couple of too fast VRAM writes that are easy to fix, but..
Your main problem is expecting sprite collision detection to work flawlessly. There's a quirk (described in the VDP datasheets too) with the statusregister if you read it at the same time the VDP sets one of its bits, it will return the wrong value. So, if you read $99 at the same time bit 5 (collision) is set, it will return 0, and reset bit 5 at the same time, making you miss the collision.

By [WYZ]

Champion (451)

[WYZ] さんの画像

29-08-2010, 18:25

@hap. Ok. Thanks for check the code.

So there are 2 problems in my side...

Do you think it is possible to fix both and make it works?

...and one problem in emulation, because the program runs ok in all emus. O_o!

By hap

Paragon (2042)

hap さんの画像

29-08-2010, 18:34

If you rely on determining the screen position *accurately* by sprite collision, then it's impossible to fix.
Yes, emulators don't emulate those quirks, exact timing is not known yet.

By hap

Paragon (2042)

hap さんの画像

29-08-2010, 18:38

About the too fast VRAM writes, it's because you're setting the address in read-mode and access $98 right after, so basically you should do ld hl,$5xxx+1 instead of ld hl,$1xxx (+1 because read-mode pre-increments the address)

By [WYZ]

Champion (451)

[WYZ] さんの画像

29-08-2010, 18:43

I suspect that calculating T-states is the other "manual" way. Tongue