Development with MSX BASIC

Página 2/9
1 | | 3 | 4 | 5 | 6 | 7

Por cax

Prophet (3740)

Imagen del cax

08-09-2010, 16:25

You forgot to tell him SCREEN 2 won't scroll when you fill it, and I believe the game needs this.

Por JohnHassink

Ambassador (5655)

Imagen del JohnHassink

08-09-2010, 16:34

That's true. In that case SCREEN 1 seems the way to go.

(is it really easier in other types of BASIC? I find that hard to believe, to be honest)

Por baltasarq

Rookie (27)

Imagen del baltasarq

08-09-2010, 17:03

SCREEN 2 does not scroll?????
Okay, I will remove all the COLOR sentences, it has no sense...

Yep; Sinclair BASIC is probably the easiest of all of them (string manipulation... etc, though it lacks speed), while the CPC is mega-fast and powerful, using the same style as GW-BASIC and MSX-BASIC.

Any idea about distribution?

Thanks

Por cax

Prophet (3740)

Imagen del cax

08-09-2010, 17:18

I see no problem with distributing it as either regular (tokenized) .BAS file or as ASCII .BAS file.
You may also consider converting .BAS to .ROM (such a tool exists) or Basic compilers.

Por baltasarq

Rookie (27)

Imagen del baltasarq

08-09-2010, 17:21

For example, the Speccy does not have screen modes. You just type text and draw graphics. You can also print with different colors this way:

10 Border 0: Paper 0: Ink 7: Cls
20 print "hello":ink 5:" world!":ink 7

The CPC is similar, though it has various screen modes and allows true paletter management.
This MSX-BASIC is more like the Dragon Basic, which is MS-Basic as well.

Por JohnHassink

Ambassador (5655)

Imagen del JohnHassink

08-09-2010, 17:37

SCREEN 2 does not scroll?????
It does, but it doesn't automatically skip to next line with each new text since it's not a text mode.
SCREEN 0 and SCREEN 1 do, since they are text modes.

(actually, SCREEN 1 is a combined text/graphical mode)

Por Manuel

Ascended (19273)

Imagen del Manuel

08-09-2010, 22:28

Maybe it would be a good idea to use NestorPreter to compress the stuff.

Por MäSäXi

Paragon (1884)

Imagen del MäSäXi

09-09-2010, 08:32

@Masaxi, unfortunately your pogram does not work. It shows me "Illegal instruction call" in 30.

What?! Question oO I didn´t check my program, as I write it straight from my head as a simple example for you, but I see no reason why my program could give such error! oO I just typed it to BlueMSX and as I thought, there is no error message, my program runs correctly. What emulator you are using baltasarq? Are you sure, that you don´t have any typing mistakes?

It shows me "Illegal instruction call" in 30.

Change line 20 to:

20 OPEN"GRP:"AS#1

Demonseed, there´s no need to do that! Smile I know that BASIC handbooks tell to use that # but line 20 works without it too! Try it and you´ll see! Smile But you need to PRINT#1,"if you wanna print something in SCREEN2 Wink"

You forgot to tell him SCREEN 2 won't scroll when you fill it, and I believe the game needs this.

I don´t know if you said that to demonseed or me, or both, but I still haven´t checked his listing, so I didn´t knew that it needs to be scrolled. Yes, as you need scrolling, then you may forget SCREEN 2. Of course you can do it in SCREEN 2, but (using BASIC) you must do without scrolling and erase "old" text to print new text.

You can do that erasing in SCREEN 2 different ways:

CLS clears screen in ANY screen mode.

LINE(x1,y1)-(x2,y2),DesiredColorNumberHere,BF this draws filled box, if you leave off that "F" from the end, then you´ll get a box without filling and if you leave off ",BF" from the end, you´ll get a line instead. Smile

Or, if you want, you can PRINT square shaped characters which have background colour, to erase "old" text. Smile You´ll get those square shapes by pressing GRAPH and P at the same time. If you use emulator, GRAPH is Alt-key. Smile Of course this last method needs much more work than previous two, but I just wanted to mention it as in some cases it may be useful. Smile

but that isn´t the same as scrolling in text mode. So, if you want scrolling screen, you´ll have to use SCREEN 0 or SCREEN 1 as said before.

You will have to think what you need the most:

SCREEN 0 has just one text colour, but you can have 40 column wide screen. Remember to WIDTH 40 to get it. Smile But if you define your own characters, please remember, that SCREEN0 shows only 6x8 sized characters, that was Texas Instruments´ way to get 40 column screen.

SCREEN 1 has just one text colour too, if you use COLOR command, but as I advised before, you can get more colours using VPOKE, thought that is a much harder way than with Spectrum´s simple INK. Sad

If you would like to have one color text, but show different coloured objects on screen, like to show a small picture of lamp or coin player has found, by using VPOKE you can give them different colours than text has, when using SCREEN 1. Smile But please note, that if you use VPOKE to get more colours to either to some letters and numbers or other characters, and then use COLOR to alter text colour, that COLOR will change colour of ALL characters! So all VPOKEd colours are gone, if you do that by mistake.

And not to forget, SCREEN 1 has "just" 32 column wide screen. Remember to WIDTH 32 to get it. Smile

It all depends what you want. Smile

Por Edwin

Paragon (1182)

Imagen del Edwin

09-09-2010, 23:24

And if what you want is 40 column text with different coloured letters, then you're actually screwed on msx1.

Screen 0 won't do different colours.

You could manage to trick screen 1 into doing that by duplicating the relevant letters in the tileset. However you're limited to 32 columns. Which would be annoying if you aligned you text to 40 columns.

Screen 2 could be convinced to do both colours and 40 columns if you make a subroutine that prints characters of a string packed at 6 pixels. This in itself would be simple enough. But scrolling the full screen one line up in basic would be an exercise in patience! (even in asm you'd be busy for about a quarter second)

It's quite intriguing that something so simple can stretch msx1 to the limits. In basic anyway. It can be done properly if you write an extension in asm.

Por MäSäXi

Paragon (1884)

Imagen del MäSäXi

10-09-2010, 12:45

I've ported this program from Sinclair Basic to Amstrad Basic

Referring to that, I think 32 column screen with different coloured letters or words is enough for him. Smile As Spectrum has "just" 32 column screen too. Wink Unless he wants to make bigger screen (Amstrad can do that). But it depends, if you mean ZX Spectrum (+,128K,+2,+3) when you say Sinclair Basic. As QL is also Sinclair machine and has better resolution than MSX(1).
Though that was called QL basic (??), so I wanna be sure about what you may mean. Smile

Screen 2 could be convinced to do both colours and 40 columns if you make a subroutine that prints characters of a string packed at 6 pixels. This in itself would be simple enough.

Of course! Big smile That is possible! Smile Then SCREEN 2 will look like as 40 column SCREEN 0, and you can have all the colours and change border colour too! Smile (but no text scroll unfortunately)

Página 2/9
1 | | 3 | 4 | 5 | 6 | 7