Detecting VDP type

Страница 2/4
1 | | 3 | 4

By santiontanon

Paladin (808)

Аватар пользователя santiontanon

07-08-2019, 16:20

I know, I know. I should be doing this on real hardware... Unfortunately I don't have real useful hardware here with me to test (my old VG8020 is now a brick used only for decoration unfortunately), and the only other MSX I own is an MSX2 (but it's back at home in the US, and I am on vacation on Spain right now, at my parents place Smile )

@Parn: I know! I think what I'm trying to do is to reach a middleground, where I want to exploit those hybrid modes that some VDPs support, but if the computer you are running the game on doesn't support it, at least give the player an option to play the game with less bells and whistles, but at least have a playable game Smile

By ARTRAG

Enlighted (6229)

Аватар пользователя ARTRAG

07-08-2019, 17:33

santiontanon wrote:

I see, what I was hoping based on Grauw's answer was that registers themselves were mirrored in some VDPs but not in others. So, writing to register "9" (which does not exist) would write to register "1" in those that do mirroring, but do nothing on those that do not do mirroring. But looking at Manuel's list, I don't think "register mirroring" is there. So, I might have to think of something else Smile

I do not think Grauw was suggesting that registers mirror in the sense you say. You will never get anything writing in R8,9 and upper in msx1 machines.

The mirroring for pattern definition (and its analogue for colors) is due to the way TMS chip generates the full address for patterns from R4 (from R3 for colors) during the tracing of the screen. The lower bits of R#4 act as a bit mask to the line address used during screen rendering.

By Grauw

Ascended (8317)

Аватар пользователя Grauw

07-08-2019, 18:51

I was referring to register addresses mirroring. Writing 0 to register 15 (out (99h),0 out (99h),8Fh) sets the value 0 to register 7 on Texas Instruments VDPs. It only considers bits 0-2 of the register number. I have observed this myself, it was the reason VGMPlay 1.2 blanked the screen during playback on MSX1 (due to a bug in VDP detection), so this definitely happens.

However I seem to recall that contrary to the TI VDPs, Toshiba VDPs discard the written values in this case. If so this could be used for detection. But I'm not certain so this should be confirmed on a real machine.

About the table base address mirroring, I don't see a way how it can be exploited for detection...

By PingPong

Prophet (3417)

Аватар пользователя PingPong

07-08-2019, 19:22

Do you think it is possible to detect sprite cloning positioning a sprite on the same position where another sprite clone itself then reading the collision status register.?

By wouter_

Champion (415)

Аватар пользователя wouter_

07-08-2019, 19:55

Grauw wrote:

However I seem to recall that contrary to the TI VDPs, Toshiba VDPs discard the written values in this case. If so this could be used for detection. But I'm not certain so this should be confirmed on a real machine.

Indeed would be an interesting test. FWIW currently openMSX does not emulate this (possible) difference. But, if it's confirmed, it should be easy to add.

By Grauw

Ascended (8317)

Аватар пользователя Grauw

07-08-2019, 21:14

PingPong wrote:

Do you think it is possible to detect sprite cloning positioning a sprite on the same position where another sprite clone itself then reading the collision status register.?

I would think so, but it is rumoured that the sprite cloning is not stable and possibly depends on the temperature of the VDP?! That’s very strange to me if true tbh, so I don’t really believe that until I’ve seen solid evidence of it… I think it just always clones and if it doesn’t then it must be under the influence of some deterministic factor.

Advantage though of detecting it by the means you suggest would be that you’re using feature detection, actually checking specifically for the thing that you want to avoid, rather than making assumptions about if one thing behaves like x then another must behave like y because we know it is the case for the existing VDPs. Feature detection’s kinda nice.

By ARTRAG

Enlighted (6229)

Аватар пользователя ARTRAG

08-08-2019, 12:18

Grauw wrote:

I was referring to register addresses mirroring. Writing 0 to register 15 (out (99h),0 out (99h),8Fh) sets the value 0 to register 7 on Texas Instruments VDPs. It only considers bits 0-2 of the register number. I have observed this myself, it was the reason VGMPlay 1.2 blanked the screen during playback on MSX1 (due to a bug in VDP detection), so this definitely happens.

However I seem to recall that contrary to the TI VDPs, Toshiba VDPs discard the written values in this case. If so this could be used for detection. But I'm not certain so this should be confirmed on a real machine.

About the table base address mirroring, I don't see a way how it can be exploited for detection...

Well, the fact tms ignores upper bits whiĺe addressing registers is well known
(It can be observed when msx2 code is ecexuted on msx1 machiles).
The real discovery would be to spot that Toshiba has a different behaviour. It is the first time I read of such possible difference. If confirmed it could be used to detect the chip type.

By santiontanon

Paladin (808)

Аватар пользователя santiontanon

08-08-2019, 13:26

Ok, I think I am going to prepare a small ROM to test this, and look for people with MSX with different VDP types, to see if they can try that ROM and figure out if there is a behavior difference that can be detected. I'll keep you posted Smile

By Grauw

Ascended (8317)

Аватар пользователя Grauw

08-08-2019, 15:09

Test program:

10 A=&HC000
20 READ V:IF V>=0 THEN POKE A,V:A=A+1:GOTO 20
30 DEFUSR=&HC000:U=USR(0)
40 DATA &HF3,&H3E,&H00,&HD3,&H99,&H3E,&H8F,&HD3,&H99,&HFB,&HC9,-1

It writes 0 to register 15. If the screen turns black, register 7 is mirrored.

By Grauw

Ascended (8317)

Аватар пользователя Grauw

08-08-2019, 15:22

I checked with Leonard Oliveira, actually I probably heard it from him originally.

He said he will check the test program tonight on his Expert DDPlus (with Toshiba engine). But already he is quite sure that it does not mirror, because MSX2 megaroms run fine on this MSX with the T6950B VDP (without video that is), whereas on TI VDPs the MSX crashes because the mirroring causes the software to overwrite the control registers.

Of course if other owners of an MSX with T6950 VDP want to run the test program as well, the more data the better.

Страница 2/4
1 | | 3 | 4