News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_milamber

Shrinking the screen in Basic

Started by milamber, 01:18, 30 May 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

milamber

Using Out &bc00,x & Out bd00,x changes the size of the screen but effects the visuals.

Ive tried the width alteration using the Out command and the system crashes!

I mention this as Ive found that sprites Called also are effected - they split!

Is there a method to return text & graphics to normal after altering the display?

Ive written a program along the lines of Jet Set Willy that only uses 16 character spaces in Mode 0.  I then started tinkering with shrinkng
the display to speed things up - yes, its all in basic.

I`m using Hisoft Turbo Basic with a mixture of machine code routines to move the sprites.

One thing i did find whilst messing with the Out command was a border within a border!  One large and one small after executing a crafty Out cammand.



 

AMSDOS

#1
Do you mean like:


for x=0 to &28:out &bc00,1;out &bd00,x:call &bd19:next x


That's how one would go about from going from a blank screen to restoring the screen fully. Ikari Warriors uses a technique like this for example.

Oh you want a Smaller screen without the scrambled images, I know what you mean, though don't know a lot how one would apply that using that method using BASIC routines, all a matter of calculationing where the image has to go to next.

Maybe easier to use the Firmware to setup a Graphics Window.

GRA WIN WIDTH (&BBCF) & GRA WIN HEIGHT (&BBD2) could be used to setup that window & GRA CLEAR WINDOW (&BBDB) could be used to clear what's in that Window. Of course if you were trying to Shrink the Screen to allow more memory to use other things in that space then yeah it might be a problem, if that's what's needed perhaps you could set your GRA WIN in the top corner and hide some lines near the bottom of the screen without scrambling the screen?  :-\
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

redbox

Quote from: milamber on 01:18, 30 May 11
Is there a method to return text & graphics to normal after altering the display?


All of the firmware routines (which are used by BASIC) are written for a screen being 80 characters wide and that's why it all goes wrong.


The only way to do it is to write your own routines, which of course means using assembler.

milamber

Thanks for the help guys much appreciated.

ZbyniuR

Unshrink screen without scrambled. ;)

FOR x=0 TO 25:OUT &BC00,6:OUT &BD00,x:OUT &BC00,7:OUT &BD00,x\2+18:FOR a=1 to 20:NEXT:NEXT

You can try with only 2 first OUTs to. :)
In STARS, TREK is better than WARS.

Powered by SMFPacks Menu Editor Mod