Raul Portales' book, font demo is off?

Por Code Witcher

Resident (43)

Imagen del Code Witcher

22-10-2021, 03:56

What's up forum.
I'm reading Raul Portales' MSX-Basic book, and the example for changing the font is not working for me. I checked the updated code on github and it's the same code.
This is supposed to create a cute font, but something is off.

Code is here:

I just copied a few lines of DATA, there's one line per letter, and I stopped here because obviously there's something off. This is from my dpc-200. I also tried on my tpc-310 which is an msx2, and it looks exactly the same.

Any ideas?

Login sesión o register para postear comentarios

Por sdsnatcher73

Enlighted (4307)

Imagen del sdsnatcher73

22-10-2021, 04:44

Did you include the screen 1? Font layout in VRAM may be different between screens? This is a wild guess… Wink

Por Code Witcher

Resident (43)

Imagen del Code Witcher

22-10-2021, 06:47

Yes, screen 1. It just looks like data is wrong, but this is weird. I can of course just change the data, I understood the procedure, still I wonder what happened here, because even the github code is wrong. I wish I could contact the author.

Por Jipe

Paragon (1625)

Imagen del Jipe

22-10-2021, 09:27

you miss datas in the listing because you have : out of data in 50
the program in examples DSK work in github

Por Jipe

Paragon (1625)

Imagen del Jipe

22-10-2021, 09:41

try this just program with comment for learning change the letter A

20 LOCATE 0,10 : PRINT"A"
30 ST=ASC("A")*8 :REM ASC("A")=65 *8=520
40 FORI=0TO7 :REM read 8 datas
50 READ R$
60 VPOKE ST+I, VAL("&H"+R$)
80 GOTO 80
1000 DATA 02,06,0E,1E,3E,76,E6,76

Por theNestruo

Champion (430)

Imagen del theNestruo

22-10-2021, 10:11

The GitHub version works as intended: https://msxpen.com/codes/-Mmb1wRKeKd8We-xUaeA
Based on your screenshot, I guess you are missing one 76,E6 in line 1000 (it appears twice: (...),76,E6,76,E6,(...))

Por shalafi

Master (171)

Imagen del shalafi

22-10-2021, 15:12

Thanks for trying the book!
It seems a couple of lines are missing from the pattern of "A" and that is carrying over the other letters. It is very hard to try that directly on a computer. When you look at it in Github, each line is 2 characters, but on a real machine is hard to see the alignement on the lines to spot if a value is missing.

I did double check all the listings before publishing, but it might be still something missing. If the book is not the same as github I should amend it for an update (which will be fine for all the people using eBooks).

That is why I recommended emulators or a mega flash ROM to put into the MSX with the code copied already... it is really easy to miss a line when typing in the MSX instead of using an editor (I still make plenty of mistakes even using an editor)