NuY Posted August 21, 2012 Author Share Posted August 21, 2012 but still question. MC inside possible? or not allowed? Not allowed You can us as many tricks as you like, and put whatever values you like into whatever memory location as long as the tokenised Basic ends up no larger than 4K! Just as long as not a single line of 6502 ASM is executed outside the Basic intepreter Quote Link to comment Share on other sites More sharing options...
NuY Posted August 21, 2012 Author Share Posted August 21, 2012 tempted now... can I even remember how to program in BASIC though? EDIT: Starting to get the hang of this using the 'paste into Altirra' method. Nobody told me about those bloody error messages in Atari BASIC (or rather the lack of...) Hint: Use TurboBASIC, but use only code which will work in Atari BASIC for compatibility reasons. Turbo gives you more legible error messages. Good plan, but remember that as a stock XL/XE is the target, what runs well in Turbo will run about 10x slower in Atari Basic Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted August 21, 2012 Share Posted August 21, 2012 I'm 1.5 K over (without optimising) but the basic game concept is working - sort of... I find the hardest part creating decent sound effects! I've enjoyed getting back into programming and have learned a bit more about display lists today (I think) I have piles of atari books everywhere Quote Link to comment Share on other sites More sharing options...
sack-c0s Posted August 21, 2012 Share Posted August 21, 2012 This is what just over 1K, about an hour of free time and 15 years without writing any BASIC gets you It's a suprisingly hard language to return to when you've been away for so long and I can't say I miss it much I do like a good Breakout clone; if it was only an hour and 1K of code up to now, that could be a hit We all like a good breakout clone - when I come across one I'll let you know It's mostly the clunky ball movement methinks - time to plumb in some PM graphics to improve things a bit... Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted August 22, 2012 Share Posted August 22, 2012 but still question. MC inside possible? or not allowed? Not allowed You can us as many tricks as you like, and put whatever values you like into whatever memory location as long as the tokenised Basic ends up no larger than 4K! Just as long as not a single line of 6502 ASM is executed outside the Basic intepreter DATA and USR allowed? Quote Link to comment Share on other sites More sharing options...
sack-c0s Posted August 22, 2012 Share Posted August 22, 2012 so I can just code it BASIC V2 style? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted August 22, 2012 Share Posted August 22, 2012 jesus... I am coding in Turbo Basic for more than 20 years and now switching back to built in stuff is really hard... just went through the commands and there are not many so it really becomes a challenge Quote Link to comment Share on other sites More sharing options...
NuY Posted August 22, 2012 Author Share Posted August 22, 2012 but still question. MC inside possible? or not allowed? Not allowed You can us as many tricks as you like, and put whatever values you like into whatever memory location as long as the tokenised Basic ends up no larger than 4K! Just as long as not a single line of 6502 ASM is executed outside the Basic intepreter DATA and USR allowed? DATA yes. USR means MC, and MC is bad (in the context of this!) and is banned Quote Link to comment Share on other sites More sharing options...
TMR Posted August 22, 2012 Share Posted August 22, 2012 so I can just code it BASIC V2 style? That's all i did really... loads of POKEs to build the display list, more to set the player up and move it horizontally, another one to write in the random block that starts appearing after a few screens and some PEEKing and POKEing of collision registers. Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted August 23, 2012 Share Posted August 23, 2012 Not that I have a dog in this fight, but couldn't you technically build a DLI or a VBI with pokes into some place like $600? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted August 23, 2012 Share Posted August 23, 2012 Sure you can... But you are not allowed to call the code? Quote Link to comment Share on other sites More sharing options...
MaPa Posted August 23, 2012 Share Posted August 23, 2012 You will not call a DLI code.. "ANTIC" will 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted August 23, 2012 Share Posted August 23, 2012 I meant the VBI or well... 2 POKES and it would be called by OS... psst... Quote Link to comment Share on other sites More sharing options...
TMR Posted August 23, 2012 Share Posted August 23, 2012 NuY said "Just as long as not a single line of 6502 ASM is executed outside the Basic intepreter" - any VBI or DLI routine is going to be disallowed because, despite not being invoked directly from BASIC, it's not part of the everyday system. Now stop trying to cheat and write something already! =-) 3 Quote Link to comment Share on other sites More sharing options...
sack-c0s Posted August 23, 2012 Share Posted August 23, 2012 I'm going to give up with the odd string handling of Atari basic and just poke my screen into existence then. Now to find somewhere safe to stash display lists, PMs and stuff like that... Quote Link to comment Share on other sites More sharing options...
TMR Posted August 23, 2012 Share Posted August 23, 2012 Now to find somewhere safe to stash display lists, PMs and stuff like that... Just keep 'em fairly high up, you're only using 4K of BASIC so there shouldn't be a problem. Where's SIO99, i thought he'd be all over this competition like a rash! 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 23, 2012 Share Posted August 23, 2012 You can reserve Ram at the top of memory easily. RT=PEEK(740)-16 : POKE 106,RT : GR. 0 RT will have the page value of your reserved "safe" 4K. Note that 400/800 OS has a bug where a clear screen operation can sometimes go past where it should, so it's probably a good idea to not use the first 256 bytes of your reserved area. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted August 23, 2012 Share Posted August 23, 2012 I am not trying to cheat... if DLIs are allowed... Quote Link to comment Share on other sites More sharing options...
Frankie Posted August 23, 2012 Share Posted August 23, 2012 I have this basic program I wrote a long long time ago I thought might be good... Then I realized it's about 16K too large! Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted August 23, 2012 Share Posted August 23, 2012 I have this basic program I wrote a long long time ago I thought might be good... Then I realized it's about 16K too large! You could always update it and enter it into the abbuc software contest instead (you have until the end of the month I think. My 4K game is nearly finished just testing the levels / difficulty Quote Link to comment Share on other sites More sharing options...
wesmond Posted August 24, 2012 Share Posted August 24, 2012 (edited) Couple of hints on memory saving that might be helpful... Re-use constants. Compare:- 1 N0=0:GRAPHICS N0:POKE 82,N0:SETCOLOR 2,N0,N0:? FRE(0) with 1 GRAPHICS 0:POKE 82,0:SETCOLOR 2,0,0:? FRE(0) So use a constant var if you're using the same number 4 or more times. and do a LIST "H:FILE.LST" NEW ENTER "H:FILE.LST" SAVE"H:FILE.BAS" at the end to rebuild the variable table and clear out any mistakes, which otherwise get remembered FOREVER. I might have something half decent in a day or two! Edited August 24, 2012 by wesmond Quote Link to comment Share on other sites More sharing options...
sack-c0s Posted August 24, 2012 Share Posted August 24, 2012 if I'm coding in notepad and writing NEW 10 . 20 REM PROGRAM GOES HERE 30 . 40 . RUN and pasting that whole thing into altirra each iteration will that have the same effect as that trick? Quote Link to comment Share on other sites More sharing options...
wesmond Posted August 24, 2012 Share Posted August 24, 2012 Yup, that's just as good, with a proper restart of Altirra. Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted August 26, 2012 Share Posted August 26, 2012 I feel a little bit of a traitor but my 4K game 4K " Keep on Koastin' " has turned out much better than I expected, so I've decided to enter it into the abbuc software contest as there's still a few days to go before the deadline (may as well go for the hat-trick of last places after Gorilla Warfare and Gwobby Strikes Back!)... I can release here it once the voting has finished It's a simple idea but seems to play quite well... once you get an idea in your head then it's much easier to create something. Thanks for the inspiration from this thread NuY now I really must make more effort to do something with the assembler Quote Link to comment Share on other sites More sharing options...
wesmond Posted August 27, 2012 Share Posted August 27, 2012 Here's my (first) effort - old fashioned slider puzzle, with "authentic" Windows progress bar while it initialises... FRE(0) works out at 3693 bytes. Controls: 4-way joystick. My 4-year old boy loves it... sort of. I'd also note that while this is well under 4k, it is not nice! To SIO99 - from our earlier thread, I'm afraid you'd despise my code here... it's full of pokes to screen memory to keep it fast, rather than locate...position...print, which would work, but rather too sluggishly (and memory costly as well). Some lines are VERY long to save bytes, the variables are quite short, lots of constants/reuse, and the DATA for the graphics is as ASCII data, with code "155" manually fixed (as you can't type it). Even strings of 2-byte hex values took me over the limit by some 80 bytes that I just couldn't optimise out... so I converted the data to ASCII, saved 1k, and got lazy after that. So, there's no machine code, but that doesn't make it pleasant to code! (in fact, I suggest, machine code would be rather easier - and a thing of beauty compared to this!) Anyhow... it's been a fun challenge - I might try an action game like TMR did when I've recovered my sanity. Hope you enjoy it (for maybe a few seconds til maybe you get fed up with it!) W. SLIDER.zip 4 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.