MSX BASIC game listing

Page 2/2
1 |

By DamnedAngel

Resident (44)

DamnedAngel's picture

08-10-2017, 21:40

eimaster wrote:

Are there any other BASIC games listings which contains machine code routines?
If you know of any very good games which combines BASIC and machine code please tell me how can I download it.

If you don't mind to type from a book in portuguese, https://datassette.org/livros/msx/msx-jogos-em-assembler. I've typed them all in my youth, but I don't have the files anymore.

[]s

By eimaster

Expert (98)

eimaster's picture

12-10-2017, 04:19

By the way... there is a STRIG problem which I don't know why it occers.
Take the game listing and look at line 610
In the original listing in the magazine variable KL% loops from 0 to 4 which is then checked if any strig button has been pressed at the title screen in order to start the game. On my real MSX it works fine but in openMSX whenever the title screen is displayed the game starts automatically as if one of STRIGs (2,3,4) is being jammed down (pressed) and that's why I was forced to modify the loop from
610 FOR KL%=0 TO 4
to
610 FOR KL%=0 TO 1
then it really waits until STRIG(0) or STRIG(1) is pressed.
Anyone knows why this problem occure in openMSX only?!

By NYYRIKKI

Enlighted (4709)

NYYRIKKI's picture

12-10-2017, 10:42

eimaster wrote:

Are there any other BASIC games listings which contains machine code routines?
If you know of any very good games which combines BASIC and machine code please tell me how can I download it.

If you are interested about mixing machine language and MSX-BASIC, I suggest that you take a look at "MSX-BASIC kun compiler" aka X-BASIC. You can edit & run your programs like you are used to, but now you can also insert ML routines and mix ie. BASIC variables and line numbers to your ML programs.

Here is very stupid example to give an idea how it works:

10 _TURBO ON
20 DEFINT A-Z
30 CH=ASC("/")
40 SCREEN 1
50 ' Fill screen with character CH
60 '#I &H3A,CH,&H2A,&H22,&HF9,1,0,3,&HCD,&H56,0
70 LOCATE 8,10:PRINT"Hello world!"
80 ' Loop line 90 until someone push SHIFT
90 '#I &H3A,&HEB,&HFB,15,&HDA,@90
100 SCREEN 0

By N.I

Expert (96)

N.I's picture

23-10-2017, 08:10

I used to use CMD statement when printing characters on Screen 4.
Example(MSXPen)

By NYYRIKKI

Enlighted (4709)

NYYRIKKI's picture

23-10-2017, 12:49

N.I wrote:

I used to use CMD statement when printing characters on Screen 4.
Example(MSXPen)

Tip: Pointer to fonts in ROM can be found from #F920

Edit: Actually that pointer points to font currently in use, so in theory it can be in ROM or RAM and in any slot if user has changed the font before running your program... The actual address for font in ROM can be found from address 4 (Saves you from copying the font back from VRAM)

By N.I

Expert (96)

N.I's picture

23-10-2017, 15:11

NYYRIKKI wrote:

Tip: Pointer to fonts in ROM can be found from #F920

Edit: Actually that pointer points to font currently in use, so in theory it can be in ROM or RAM and in any slot if user has changed the font before running your program... The actual address for font in ROM can be found from address 4 (Saves you from copying the font back from VRAM)

Thanks for the tip. I didn't know the pointer to fonts. Indeed, it is smarter to refer to it.
Updated version

Page 2/2
1 |
My MSX profile