BBC Basic for SDL 2.0 - VDU 23 command not working
-
- Posts: 6
- Joined: Wed Mar 24, 2021 6:30 pm
- Contact:
BBC Basic for SDL 2.0 - VDU 23 command not working
Hi all. I got my BBC Micro from 1983 working and managed to access a disk containing some of my old Basic games I created. They work fine in BeebEm. Extracted as text files and opened in BBC Basic for SDL 2.0. They appear to run ok except for any user defined characters using VDU 23. See attached screen shot. First is what the game should look like and second is in BBC Basic for SDL. Reason I'd like it working is that I want to create standalone .exe. Thanks!
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
VDU 23 works fine for me. What's more likely is that the program is broken, defining, eg CHR$224, and then printing CHR$128 and somehow expecting them to be the same.
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
-
- Posts: 6
- Joined: Wed Mar 24, 2021 6:30 pm
- Contact:
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
Thanks for quick reply! First screen is from beebem so I think program is ok?
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
One of the things the Beeb did is what JGH alludes to; unless you "explode" the user defined characters then a redefined character shows in multiple places in the character map.
(See OSBYTE 20 for details of how this works)
eg
This will, as expected, draw a solid box.
BUT "VDU 128" will also draw a solid box.
This started to hit people on a Master 128 'cos there the character set is "exploded" by default; now if you do VDU 224 you get the expected block, but VDU 128 gives an "A".
It's very likely you're hittting a similar issue in your code.
(See OSBYTE 20 for details of how this works)
eg
Code: Select all
MODE 2
VDU 23,224,255,255,255,255,255,255,255,255
VDU 224
BUT "VDU 128" will also draw a solid box.
This started to hit people on a Master 128 'cos there the character set is "exploded" by default; now if you do VDU 224 you get the expected block, but VDU 128 gives an "A".
It's very likely you're hittting a similar issue in your code.
Rgds
Stephen
Stephen
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
By default BeebEm runs a Model B emulation. If you change it to Master emulation (Hardware > BBC Model > BBC Master 128) you will see the same effect as with BB4SDL.
On a Model B the font is 'imploded' by default, meaning there are only 32 UDGs, repeated across the 128-255 character range. On a Master and in BB4SDL the font is ' fully exploded', meaning every character can be redefined.
As JGH says above, your program is probably redefining characters in the 224-255 range, but is printing characters in the 128-159 range. With an 'imploded' font on the Model B this will repeat the defined characters, while an 'exploded' font will just show the original character definitions.
Try changing your VDU 23 statements to use characters 128-159:
VDU23,224,... becomes VDU23,128,...
VDU23,225,... becomes VDU23,129,...
etc.
-
- Posts: 6
- Joined: Wed Mar 24, 2021 6:30 pm
- Contact:
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
Great thanks for the help. Will try and report back in case others have a similar problem.
-
- Posts: 419
- Joined: Mon Jun 14, 2021 7:39 pm
- Contact:
Re: BBC Basic for SDL 2.0 - VDU 23 command not working
Will you post up your game/games when you fix it , screen shots look interesting.
Always good to see long time rare creations come into the light again.
Brian
Always good to see long time rare creations come into the light again.
Brian
Sysop of (the Night Owl BBS) nightowlbbs.ddns.net:6400