Is a MSX2 machine slower than a MSX1 one?

Página 3/3
1 | 2 |

Por jltursan

Prophet (2619)

Imagen del jltursan

18-10-2019, 23:35

Just as a curiosity, this is the new performance of the NMS-8245 after aplying the following patch (left, patched hook):

The code (very limited now):

htimi:	ld hl,REPCNT
	ld a,(hl)
	dec a
	jr z,.incr
	cp 1
	jr z,.end
	ret
.incr:  ld a,2
.end:	ld (hl),a
	ret

Por Grauw

Ascended (10767)

Imagen del Grauw

18-10-2019, 23:48

Even just tweaking the key repeat counter makes such a difference? I thought it would only make a 5 scanline or so difference… (SCNCNT being the bigger factor.)

Por akumajo

Resident (43)

Imagen del akumajo

19-10-2019, 10:47

jltursan wrote:
htimi:	ld hl,REPCNT
	ld a,(hl)
	dec a
	jr z,.incr
	cp 1
	jr z,.end
	ret
.incr:  ld a,2
.end:	ld (hl),a
	ret

dec a vs. cp 1
dec a is a smaller and faster way to check if a equal 1 Wink

Por Grauw

Ascended (10767)

Imagen del Grauw

19-10-2019, 12:26

It writes a to (hl) after the compare so using dec a is not functionally identical.

Por akumajo

Resident (43)

Imagen del akumajo

19-10-2019, 13:06

You're right, and the gain is too insignificant if we do "inc a" after, forget what I said oO

Por jltursan

Prophet (2619)

Imagen del jltursan

19-10-2019, 13:20

Quite shocking indeed, between the above ISR installed or not there're slightly more than a dozen scanlines. I've double-checked this and that's what i'm getting.

EDIT: In fact, disabling all OpenMSX effects, I can count more than twice the above...

Por Manuel

Ascended (19462)

Imagen del Manuel

19-10-2019, 22:57

jltursan, what do you mean exactly? openMSX effects have no influence on the timing of the running MSX programs of course...

Por jltursan

Prophet (2619)

Imagen del jltursan

19-10-2019, 23:55

I mean that in my previous screenshots, the scanlines and blur make difficult to manually count the scanlines difference. With these effects disabled, is easier to spot a bigger difference in speed. Of course it has nothing to do in how the program runs Smile

Por theNestruo

Champion (421)

Imagen del theNestruo

29-01-2023, 10:49

I hope this does not count as necroposting, but I would like to add some details in case someone reaches this thread in the future:

It seems to be some relationship between the value the SCNCNT is reset (ld [hl],n ; @$0c96) to and the values REPCNT is initially set, then reset (ld a,n ; @$0d49 and ld [hl],n ; @$0cf0). The SCNCNT is loosely correlated to the MSX generation, but there are differences between 50/60Hz and every some particular models:

  • Most MSX 1 do scan every 3 frames (and repeat key every scan after a delay of 13 scans).
  • But several MSX 1 50Hz (Casio MX-15, Sony HitBit 10P/20P/101P/201P/501P, Yamaha CX5MII and maybe others) do scan every frame (and repeat key every 3 scans after a delay of 39 scans). I guess this was a decision to make the typing more responsive and, as there are more CPU time per frame, performance is not worse than 60Hz counterparts. Note the values of the repeat key are adjusted so the feeling is similar. Curiously enough, Sony HitBit 55P/75P/75D do not fall into this category, but the previous one (scan every 3 frames).
  • Some MSX 2/2+ 60Hz (Sony HitBit F1/F1XD/F1XDJ/F1XV; maybe other computers as well) do scan every two frames (and repeat key every scan after a dealy of 20 scans).
  • Sony HitBit F9P do scan every frame, but repeat key every 2 scans after a delay of 32 scans. The Russian variant of this computer falls into the previous category.

Disclaimer: Please take this with a grain of salt. I have found this doing something completely unrelated, so I haven't checked all the BIOS (but the ones that were relevant for me) and I haven't verified one by one I was using the right dump, but trusted the filenames.

Página 3/3
1 | 2 |