OpenMSX crashes / feature to detect OpenMSX

By Accumulator

Champion (351)

Accumulator's picture

20-01-2023, 21:44

I was looking a way to detect running software in emulator, for my own sake, to be sure I have to test routines on bare hardware and not in emulator.. After trying 1001 things and crawling the forum, I had to give up..
However, coding on pc and trying some routines I was able to crash OpenMSX.

2 options:

1) inform and can be fixed
2) Keep it for my own sake and when crashes I know I am in a emulator.

I decided to inform, I will find another way, I am sure of it.....

The error:

openmsx: src/video/VDPVRAM.hh:242: void openmsx::VRAMWindow::getReadAreaPlanar(unsigned int, unsigned int, const byte*&, const byte*&) const: Assertion `(areaBits & effectiveBaseMask) == areaBits' failed.
Aborted (core dumped)

This happens when you selecting:
Register #0 bits M5 and M3
Register #8 bit VRS

In basic the same result:
20 VDP(9)=VDP(9) AND &B11110011
30 VDP(9)=VDP(9) OR 8

run and crash!

This could be a feature to deny some software running in OpenMSX..

Login or register to post comments

By wouter_

Hero (535)

wouter_'s picture

20-01-2023, 21:49

Thanks a lot for reporting!

I can reproduce the crash. I'll try to fix it soon (hopefully in a few days, I'm a bit busy now).

By Accumulator

Champion (351)

Accumulator's picture

20-01-2023, 22:00

You are welcome,

This happens also using SCREEN 8.

By wouter_

Hero (535)

wouter_'s picture

22-01-2023, 20:00

Should be fixed now. Thanks again for reporting.

BTW: what kind of emulator-detection-check are you looking for? MSX1, MSX2, Turbo-R? Should the check also flag machines like OCM as an emulator? Feel free to join our IRC/discord to bounce some ideas.

By Accumulator

Champion (351)

Accumulator's picture

05-03-2023, 23:59

As I am coding on PC and from time to time I need a reminder I have to run the code on a bare MSX, therefore I need a reminder.
For MSX2 (and up) it is easy, checking VDP status register 245 (if I can recall, VDP R#15,245). Real MSX the result varies, Emulator is fixed at 0x0.
Tested on MSX2, F flag of status register , works on MSX2 (and up), MSX1 (TMS9918/TMS9928/TMS9929) gives not desired result (was informed by WIcracks)

I noticed the 'bug' , VDP R#9, is resolved! Super, thanx!

By Wlcracks

Hero (572)

Wlcracks's picture

06-03-2023, 12:41

Accumulator wrote:

gives not desired result (was informed by WIcracks)

Maybe on an other MSX1 (with engine) it could work.

By inchl

Expert (105)

inchl's picture

04-08-2023, 13:41

Found a difference between webmsx and real hardware/openmsx. Webmsx does not update the S-flag the same way. Not sure if this is a bug? According to documentation the S-flag not known how its being updated, so it might not be wise to use.

ld	bc,#802c
inc	b
jp	p,webmsx

By Manuel

Ascended (19678)

Manuel's picture

20-08-2023, 18:33

Better report it at the WebMSX developer...