SeptTandy Project Announcement 2024

 Image

SeptTandy is nearly here! I have a few ideas which I will try and get to but the main one I am excited to get started on.

I am going to be working on a SFX utility for BASIC that helps you compose those PLAY statements - usually at Tempo 255 to create those bleeps and burbles for my BASIC programs. This will run on both Tandy and Dragons. It should be more fun to use than editing PLAY statements!

Aiming to let you print out the final statement which can be captured by emulator to file (XRoar allows this) so they can be copied into VSCode etc easily.

P.S. One of the sound effects on Lucky Egg was PLAY"T255BADEGG"

The Joy Stick Man

 I did say stick man would be back!

I have had a game idea for a while which would be a good fit for the stickman from Lucky Egg. It's called 'Cash Grab' and some of the code and the GFX could be reused but I needed up and down movement for the game. Once I had this coded I realised this could be a useful little example for someone learning Dragon/Coco basic so here it is. Oh yes, I wanted it to have joystick control too so I added this and backported it to Lucky Egg too.

Code is below but you can also find it on Github.

In the next blog post, we'll take a look at interacting with objects on screen.

10 DIMH(16),I(16),A(1),B(1),X,Y,V,W
20 FORI=0TO15:H(I)=I*16:NEXT
30 REM SET UP GRAPHICS
40 PMODE0,1:PCLS:SCREEN1,1
50 GET(0,0)-(15,15),B
60 FORL=0TO7:READD:POKE1536+(L*16),D:NEXT
70 GET(0,0)-(15,15),A
80 REM SET STARTING POSITION
90 X=8:Y=5:V=1:W=1
100 PCLS:GOTO210
110 REM GAME LOOP
120 A$=INKEY$:IFA$="P"THENX=X+1ELSEIFA$="O"THENX=X-1
130 IFA$="Q"THENY=Y-1ELSEIFA$="A"THENY=Y+1
140 J=JOYSTK(0):IFJ=0THENX=X-1ELSEIFJ=63THENX=X+1
150 J=JOYSTK(1):IFJ=0THENY=Y-1ELSEIFJ=63THENY=Y+1
160 IFX<0THENX=0
170 IFX>15THENX=15
180 IFY<1THENY=1
190 IFY>11THENY=11
200 IF X=V AND Y=W THEN 120
210 PUT(H(X),H(Y))-(H(X)+15,H(Y)+15),A,PSET:PUT(H(V),H(W))-(H(V)+15,H(W)+15),B,PSET:V=X:W=Y
220 GOTO 120 : REM CONTINUE LOOP
230 REM STICK MAN
240 DATA24,60,24,126,24,24,36,66
250 REM

Revisiting Flip Bits and Porting To The MC-10

 Last year, I had fun writing a version of the Flipping Bits Game (from the Rosetta Code site) from scratch. It's a nice relaxed puzzle especially if you are into binary. Recently whilst browsing through my retro code, I realised this game would only require minor changes to port to the MC-10.

So I made the changes rather quickly and then found a bug. Levels 1 to 9 are hand coded whereas later levels are randomly generated (though always solvable). Thankfully the fix was easy enough and, yes, I remembered to fix the Dragon/Tandy version too!

The downside of the game is a little slow in places - PLEASE WAIT pops up between every move. It has to check the entire 2D array after each move against the solution. Luckily the MC-10 has an excellent BASIC compiler. I ran it through that and it is now almost instant in response. It really cool to get that speed boost! This makes me very excited for the various tools being created at the moment for the Tandy and the Dragon. Hopefully more people will be able to code that BASIC game they always wanted to.

Have some flipping fun! Here's the MC-10 version - C10 file in the media folder.

New Game Lucky Egg

 First post in quite a while. Not much time for retro so far this year!

Anyway, I started off playing with GET/PUT on the Dragon which allows you copy chunks of GFX around. The Dragon has no built-in sprites so this is the next best thing. There's quite a few optimisations and tricks you can use so keep things fast so I thought it would be fun to break away from SG4 (Text screen) for a while.

I chose PMODE0 which is the lowest of the high resolution GFX modes where 1byte = 8 pixels. I used POKE to create a stick man 8 pixels high on the screen. GET and PUT for such a small character is pretty fast. I added some movement controls and stick man was soon running about. The idea of catching something came to mind so why not eggs? It was much easier than expected to get a fast action game written in BASIC - albeit a very simple one.

After all that, it was just a case of tidying up and adding some polish like a title screen and a high score.

It is going to be interesting to try other modes and see how it affects the speed. There's definitely some spare cycles in the game and we have not even used the speed up poke or other tricks. It's better than a lot of type-ins I've tried - no flickering and it's fast. They often use PMODE4 which is probably too high resolution for most simple type-in games.

As always, the source is available on GitHub. Have fun! Watch out for another stick man game coming soon...

Magic Mirror On The Screen

Well this doesn't need much explanation either... mirroring. Again the buttons aren't amazing but are functional. 

The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading!




We Are Scrolling

Well this doesn't need much explanation... scrolling. May change the buttons but they will do for now. 

Time for some mirroring next!

The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading.

Oops and The Grid

Oops I hadn't noticed the auto-deployed build was broken for a while. Some boring filename casing stuff was breaking the deploy. Sorted now!

Added a toggle for the grid (which was mostly in place already). Demo gif below:

Time for some scrolling next!

The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading.



Export The Screen

It's been ages since I posted here - sorry! I got distracted with some type-ins (videos soon) and life stuff. Since my last blog post a CLS dialog and the export dialog have been added.

 Anyway we now have a working export dialog. There's at least two more export types I want to add but some other features have priority. 5 days of SepTandy to go - we will have a final push!


The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading.

Screen Time

 Time to add in the screen! Luckily the canvas version from the previous React version was pretty well component-ised. Main changes were due to state update (storing the character). Left and Right Mouse buttons can now draw on the screen at it remembers.

Progress is going fast on this version of SGEdit - might need something else to keep me busy for SeptTandy! Next time, I think I will fix the screen layout and add another toolbar.

The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading.









Characters and State

One of the good points of my previous React version of SGEdit was the Character Set. Instead of having 200+ image files to load, I encoded them into base64 and they are just a Javascript array now. This meant it was fairly easy to get the characters on screen in a palette of blocky goodness.


Once that was done, I wanted to add a primary and secondary character (left and right mouse buttons) which required me to store the state for the app. Previously I used Redux which is fine but rather clunky so I searched around for something new and found HookState which requires much less boilerplate code. Yay!

The code is on GitHub if you want to follow along with the code. The WIP output will appear here. Thanks for reading.


SepTandy 2023 - SGEDIT in React

It's very nearly September so time to start thinking about SepTandy for 2023!

I had a few ideas but settled on and update to SGEdit. I have quite a few ideas on what to do. There's some new features I want to add, but I decided to start by picking up an abandoned rewrite of the app in React. To see what state it's in, I tried to get it running tonight but breaking changes in the JS web stack prevented that.

So initial plan is to rebuild it from scratch from an empty app. The unfinished React version was more ambitious with plans for more screen modes. This time around I'd like to focus it back onto the classic 32 by 16 screen with easy to use outputs. Once I am happy with that, I'll maybe consider other fancier stuff. 

I will update GitHub as I go if you want to follow along with the code. The WIP output will appear hereShould be fun! Hope you can come along for the ride.




Stitchet Type-In From Dragon User January 1985

This is an interesting yet short type-in from Dragon User January 1985 . The final REM lines include details for running in PMODE3 so I have...