2600problems Posted February 27, 2017 Share Posted February 27, 2017 10 print chr$(145);"bomb disposal" 20 let x= 4001 30 input x 40 if x=true then goto 60 50 if x=200 then goto 70 60 print "phew" (good end) 70 print "retry" (game over) how do I save this program and expand it to allow sprites and graphics? thanks in advance by the way, are there any outside programs that allow poke commands? Quote Link to comment Share on other sites More sharing options...
Theo71 Posted February 27, 2017 Share Posted February 27, 2017 I don't know if you're using a taperecorder in that case it would be with: SAVE"name" Commands must be in capitals. Most graphical stuff can be done with the VDU command, VDU 23 is (I assume) for making sprites. Peek and poke as commands don't excist in BBC BASIC, more or less can be don with the question mark. Greetings, Theo Quote Link to comment Share on other sites More sharing options...
2600problems Posted February 27, 2017 Author Share Posted February 27, 2017 i am using the Beebem emulator. i just figured out how to save a program so that's cleared. thank you for the help Quote Link to comment Share on other sites More sharing options...
Theo71 Posted February 27, 2017 Share Posted February 27, 2017 A few days ago I compiled the Beebem emulator for this machine (Ubuntu) and I have an Acorn Electron for almost 33 years so I know a bit about BBC basic Due the fact that BBC basic has already has a built in assembler I guess PEEK and POKE instructions were unnecessary If you don't mind I can put some example sprite etc in your listing, just to make an example? Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 2, 2017 Author Share Posted March 2, 2017 please do Quote Link to comment Share on other sites More sharing options...
Theo71 Posted March 2, 2017 Share Posted March 2, 2017 No problem, Your example is not in BBC basic so I rewrite it a bit to make it work Quote Link to comment Share on other sites More sharing options...
Theo71 Posted March 2, 2017 Share Posted March 2, 2017 L. 10 MODE 2 20 REM SPRITE (VDU 23,REDEFCHARACTER,8 VALUES) 30 VDU 23,224,24,60,126,219,126,36,66,129 40 REM BLINKING COLOUR FOREGROUND 50 COLOUR 11 60 REM BACKGROUND COLOUR 70 COLOUR 128 80 CLS 90 REM PRINT THE SPRITES (224) BESIDES THE TEXT 100 PRINT CHR$(224); " Bomb disposal "; CHR$(224) 110 REM SET FOREGROUNDCOLOUR BACK TO WHITE 120 COLOUR 7 130 PRINT:PRINT 140 INPUT "Which number"; X 150 IF X=10 THEN 160 ELSE GOTO 180 160 PRINT:PRINT"Phew" 170 GOTO 190 180 PRINT:PRINT"Retry" 190 END> In line 30 is the sprite, with VDU 23 you can redefine characters (in this case 224). the values after that are from an 8 x 8 grid. From left to right the values are : 128,64,32,16,8,4,2,1 000XX000 = 24 00XXXX00 = 60 0XXXXXX0 = 126 XX0XX0XX = 219 0XXXXXX0 = 126 00X00X00 = 36 0X0000X0 = 66 X000000X= 129 It isn't that difficult I believe. The colours are random picks and there are lists which colours are possible in the different modes. Good luck! Quote Link to comment Share on other sites More sharing options...
pirx Posted March 3, 2017 Share Posted March 3, 2017 10 print chr$(145);"bomb disposal" 20 let x= 4001 30 input x 40 if x=true then goto 60 50 if x=200 then goto 70 60 print "phew" (good end) 70 print "retry" (game over) I know this is just an illustratrion but as a programmer must point out that this if .. then sequence is seriously flawed )))))))))) 1 Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 8, 2017 Author Share Posted March 8, 2017 its my first time. i'm vaguely familiar with british computers Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 8, 2017 Author Share Posted March 8, 2017 thanks a whole lot. so, as an American programmer, is there a way to change the british spelling of color to American for the bbc micro? Quote Link to comment Share on other sites More sharing options...
Theo71 Posted March 8, 2017 Share Posted March 8, 2017 You're welcome and it isn't easy to change a BASIC keyword, after all it's all in ROM. It's a British computer, so we have to deal with ColoUr Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 8, 2017 Author Share Posted March 8, 2017 darn. hey, while we're on the subject, should i buy a commodore vic 20 or an atari 800? Quote Link to comment Share on other sites More sharing options...
Bryan Posted March 8, 2017 Share Posted March 8, 2017 Compared to the 800, the Vic20 is pretty limited. 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 8, 2017 Share Posted March 8, 2017 true is a function (internal constant) that represents a value of -1 for boolean true, false represents 0. Statement IF X = true THEN ... is the same as testing IF X = -1 THEN ... So really you wouldn't want to use it in this way. Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 9, 2017 Author Share Posted March 9, 2017 i've noticed a weird thing in beebem. occasionally, it will freeze the keys and will need to be reset Quote Link to comment Share on other sites More sharing options...
Theo71 Posted March 9, 2017 Share Posted March 9, 2017 darn. hey, while we're on the subject, should i buy a commodore vic 20 or an atari 800? Nothing against the VIC 20, but it's an upgraded PET in a small case. The 800 is better. And about Beebem, I'm using the linux version without any troubles. Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 10, 2017 Author Share Posted March 10, 2017 weird Quote Link to comment Share on other sites More sharing options...
carlsson Posted March 10, 2017 Share Posted March 10, 2017 The Atari 800 also cost about twice - or more - of what a VIC-20 cost. So yes, you got a lot more computer for your money but you also invested a lot more money to get a computer in the first place. Pick any two different cars from different price segments if you want. Both will hopefully take you from point A to point B, but your ride might be very different depending on which car you drive. Quote Link to comment Share on other sites More sharing options...
Theo71 Posted March 10, 2017 Share Posted March 10, 2017 @carisson you're right, the VIC-20 is a fine machine for it's money but it's in a different league than the 800. And some ports of games are really great (or maybe the best) on the VIC-20. Gridrunner 1 & 2 (Matrix) from Jeff Minter for example. @2600 perhaps an advice, download a couple of (good) emulators and try it yourself. Both are fine machines, but different in capabilities and prices. What suits you the best is a personal thing. Quote Link to comment Share on other sites More sharing options...
+Stephen Posted March 11, 2017 Share Posted March 11, 2017 Atari 400 to Vic 20 is the fair comparison. And even then the 400 shits all over it. The Vic-20 is in many ways less powerful than a 2600 (no hardware sprites), but at least it had 3.5k of RAM and a nice 22 column text mode. Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 11, 2017 Author Share Posted March 11, 2017 how does the PEEK command work btw? i keep getting syntax errors Quote Link to comment Share on other sites More sharing options...
carlsson Posted March 11, 2017 Share Posted March 11, 2017 PRINT PEEK(X) where X is a positive integer between 0 and 65535. On some systems you need to use the range -32768 to +32767 instead. The Atari 400 still cost 50% more than the VIC-20 in mid-83 before the 400 got discontinued in favor of the XL series. As a customer, I would get disappointed if paying 50% more didn't get me 50% more computing power, which can be argued if the unexpanded 400 offers. Quote Link to comment Share on other sites More sharing options...
toddtmw Posted March 11, 2017 Share Posted March 11, 2017 I started with the 800. A friend had the 400. When he was buying a replacement keyboard and a third-party memory upgrade, I was saving for a floppy drive. I hated programming at his house typing on that membrane keyboard. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 12, 2017 Share Posted March 12, 2017 There is no PEEK or POKE on the BBC, it's done differently, using Indirect Operators. Use ? for byte, ! for word, $ for strings. & can be used to convert to hex. e.g. ?16384 = 255 equivalent to POKE 16384,255 D=?16384 equivalent to D=PEEK(16384) ?&4000=&F0 eq to POKE 16384,240 PRINT ?&4000 if done after should return 240 $&4000="ABCDEF" will store the string starting at that address, followed by CR ($0D). Unsure if the Return character can be omitted. 1 Quote Link to comment Share on other sites More sharing options...
2600problems Posted March 13, 2017 Author Share Posted March 13, 2017 okay, so i'm using atari800win and any graphics modes higher than 0 give me a black screen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.