I finally learned what poke -1,170 does

Page 1/2
| 2

By janvv

Resident (41)

janvv's picture

25-09-2017, 07:23

For 30 years this used to be 'one of those magic things that you do'.

But I have been learning about subslots, and today I realized that poke -1,170 is to change the subslot to make sure RAM will be mapped into 0000-7fff. This also explains why it's different on Turbo-R... the RAM is in a different subslot.

That is all Smile

Login or register to post comments

By TheKid

Paragon (1238)

TheKid's picture

25-09-2017, 08:31

and what is the equavalent for poke -1,170 on a turbo R ?

By ro

Scribe (4921)

ro's picture

25-09-2017, 08:50

wasn't that poke -1,&HAA ?

By Grauw

Ascended (10716)

Grauw's picture

25-09-2017, 09:37

https://www.faq.msxnet.org/miscfaq.html

Quote:

How can I let most of the MSX1 software work on MSX2 machines/what is the universal slot-select-correct POKE?
The universal poke to do this is:
POKE -1,1.0625*(NOT(PEEK(-1))AND&HF0)
The same POKE, but a bit shorter:
POKE -1,(15-PEEK(-1)\16)*17

Harder to remember, but works on every machine :D.

(Replace "poke -1," with "print" to see the exact number.)

By meits

Scribe (6534)

meits's picture

25-09-2017, 10:09

Grauw wrote:

Harder to remember, but works on every machine Big smile.

haha yeah. I always google it and c/p it whenever I run into a reset due to 170 Smile

By ren

Paragon (1932)

ren's picture

25-09-2017, 15:50

Congrats, now when are you going to restore the RPGFan website? Wink

By TheKid

Paragon (1238)

TheKid's picture

25-09-2017, 16:22

cool, thanks grauw. Didn't know that one Smile

By janvv

Resident (41)

janvv's picture

25-09-2017, 17:59

Yeah the universal poke sets page 0/1 to the same subslot as page 2/3, because we know those are RAM. Makes perfect sense!

On a Turbo R it's poke -1, 0

Ren: I'm honoured that you remember rpgfan.demon.co.uk. It's gone for good unfortunately!

By Grauw

Ascended (10716)

Grauw's picture

25-09-2017, 18:06

Except on machines where it isn't in the same subslot Big smile.

By Feiraco

Master (138)

Feiraco's picture

25-09-2017, 22:23

That poke was legendary..... :-)

Wasn't there another formula with the same outcome?

By Manuel

Ascended (19320)

Manuel's picture

25-09-2017, 22:53

janvv - you're joking right??? You programmed quite complex MSX games without knowing about subslots?? No way.

Page 1/2
| 2