lucien2 Posted July 7, 2013 Author Share Posted July 7, 2013 OK, if you can run TurboForth 1.0 without my BLOCKS file and have garbage when you put it in DSK1, then I don't know. I tested it with Classic99 QI362, MESS, and the hardware. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-2788046 Share on other sites More sharing options...
OX. Posted July 7, 2013 Share Posted July 7, 2013 It's the TurboForth v1.0 cart binaries that you posted on here, tried them with both Classic99 v367 and MESS 140 and both react with garbled screen, I also have TF 1.2 which boots fine but obviously is no good for your program. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-2788066 Share on other sites More sharing options...
lucien2 Posted July 7, 2013 Author Share Posted July 7, 2013 I just re-downloaded the TF1.0 files and tried it with Classic99 v367. It runs fine. What is written in the classic99 debugger log? Try to copy classic99.exe and the 4 DLLs in another folder. It will generate the default classic99.ini file. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-2788071 Share on other sites More sharing options...
OX. Posted July 7, 2013 Share Posted July 7, 2013 (edited) On closer observation of the startup the option 2 from start menu says "Turbo Forth 1.2", could this be a corrupt or mis-match of cart images from you v1.0 link? Edit - answered my own question there, must have mixed up one of the .bins with version 1.2 Apologies Lucien, I'd love to see this game finished, very promising! Edited July 7, 2013 by OX. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-2788085 Share on other sites More sharing options...
lucien2 Posted March 31, 2015 Author Share Posted March 31, 2015 OK, thanks to Willsy's post here, I had to return to TI-WARS. If I hit the memory upper limit, I can't say anymore: Memory is full, there is no way to easily finish this game without complicated load/unload of code from disk. First I had to make it compatible with TurboForth 1.2. While I was doing it, I chose to also adapt it to fbForth and TF1.1. In Forth, it's easier to do it afterwards than in other languages: just define a few missing words and redefine some incompatible ones at the beginning of the program. Leave the rest unchanged! Here are the differences between the TurboForth versions. LOO is used to prepare the parameters for TurboForth's DO/+LOOP to make it compatible with other Forths. TF1.0 DO/LOOP does not work with LEAVE and some versions of TF's DO/+LOOP don't work when the start value is less or equal than the final value. TF1.0 --------------- : -> --> ; IMMEDIATE : BL 32 ; : LOO ( lim strt -- ) SWAP 1- SWAP 2DUP <= IF SWAP DROP DUP 1+ SWAP THEN ; : INPUT-NUMBER ( -- n ) INPUT-STRING PAD SPAN @ NUMBER IF DROP -1 HONK-TONE THEN ; 2 CONSTANT STRLBYTES TF1.1 --------------- : -> [COMPILE] --> ; IMMEDIATE : LOO ( lim strt -- ) 2DUP <= IF SWAP DROP DUP 1+ SWAP THEN ; : INPUT-STRING ( -- ) ACCEPT-TONE PAD 80 EXPECT 80 >IN ! ; : INPUT-NUMBER ( -- n ) INPUT-STRING PAD #TIB @ NUMBER IF DROP -1 HONK-TONE THEN ; 1 CONSTANT STRLBYTES TF1.2 --------------- : INPUT-STRING ( -- ) ACCEPT-TONE $0500 80 EXPECT 80 >IN ! ; : INPUT-NUMBER ( -- n ) INPUT-STRING $0500 PAD SPAN @ VMBR PAD SPAN @ NUMBER IF DROP -1 HONK-TONE THEN ; Here is what I changed from the FIG version to adapt it to fbForth: FIG --------------- : V! C!VDP ; : V@ C@VDP ; : THEN [COMPILE] ENDIF ; IMMEDIATE : GOTOXY ( col row -- ) C-ROW ! C-COL ! ; : SCREEN ( b -- ) 7 C!REG ; : PICK ( n -- n ) 1+ PICK ; : ACCEPT-TONE 52 GPLLNK DROP ; : HONK-TONE 54 GPLLNK DROP ; : SPRITE ( # y x asc color -- ) 4 PICK 4 * 771 + DUP ROT SWAP V! SWAP 128 + SWAP 1- V! SPRLOC ; : HCHAR ( y x asc count -- ) ROT 3 PICK 32 * + SWAP ROT FILLVDP DROP ; : GRAPHICS-MODE ( -- ) GMODE 0 PAGE ! 32 B/LINE ! ; : TEXT-MODE ( -- ) TMODE ; : PATTERN ( addr count n -- ) 8 * 1024 + SWAP CELLS ROT ROT SWAP ROT VMBW ; FB --------------- : V! VSBW ; : V@ VSBR ; : PICK ( n -- n ) 1+ CELLS SP@ + @ ; : ACCEPT-TONE BEEP ; : HONK-TONE HONK ; : 2DUP OVER OVER ; : ROLL ( n -- ) -DUP IF 1- SWAP >R MYSELF R> SWAP THEN ; : EMIT EMIT8 ; 0 VAR LAST-KEY : ?KEY ( unit -- code status ) DROP ?KEY8 DUP LAST-KEY @ = IF -1 ELSE DUP -1 = IF 0 ELSE 1 THEN THEN SWAP DUP LAST-KEY ! SWAP ; : SPRITE ( # y x asc color -- ) 4 PICK 4 * 771 + DUP ROT SWAP V! SWAP 255 + SWAP 1- V! SPRLOC ; : HCHAR ( y x asc count -- ) 3 ROLL ROT ROT SWAP HCHAR ; : GRAPHICS-MODE GRAPHICS ; : TEXT-MODE TEXT ; : PATTERN ( addr count n -- ) 8 * 4088 + SWAP CELLS ROT ROT SWAP ROT VMBW ; Now it can be run with 5 forth versions: TurboForth 1.0, 1.1, and 1.2(.1), fbForth 2.0 and Weiand FIG forth The next step is to optimize high memory usage (compiled code is put there). At first I just removed the map editor. It's not that useful to instantly switch between the game and the map editor. Free memory (before -> after): TurboForth 1.2: 1124 -> 3272 fbForth: 2292 -> 4334 FIG: 2314 -> 4356 Then, I'll need to prepare my VDP patterns/colors in a block, ready to be moved to VDP. Finally, I need to put all my arrays to the following free memory zones: TurboForth: entire low ram or VDP at >3420 (951 bytes) fbForth: VDP at >1152 (9350 bytes) FIG Forth: VDP at >1430 (~11088 bytes), low ram from >2080 (after TIB) to >2680 (before return stack) 3 Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3209833 Share on other sites More sharing options...
+Ksarul Posted March 31, 2015 Share Posted March 31, 2015 Excellent! I am looking forward to this. . . Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3209847 Share on other sites More sharing options...
Opry99er Posted March 31, 2015 Share Posted March 31, 2015 Heh... Sick. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3209866 Share on other sites More sharing options...
+Lee Stewart Posted March 31, 2015 Share Posted March 31, 2015 NIce, @lucien2! I will be watching this, as well—for obvious reasons. ...lee 1 Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3209912 Share on other sites More sharing options...
Willsy Posted April 1, 2015 Share Posted April 1, 2015 (edited) Nice! In TF V1.2 you can get more free VDP memory by setting #BUF. See the release note for V1.1 here. Also, check out the VDP memory map here. If you set #BUF to 1 then only VDP block buffer 0 @ >3020 will be used for used for block operations, meaning there is 5K free from >1C20 to >2C1F. Give it a try. I have a new build of TFV1.2.1 ready to release. Current build of TF is V1.2.1:0 (build 0) but I have V1.2.1:1 ready to roll. It includes a bug fix (shame on me) >MAP which is the word that does the SAMS mapping! (For some reason, V1.2.1:0 seems to write garbage values to the mapping registers. I just scrapped the code for V1.2.1:1 and re-wrote it from scratch). I'll post that build later this evening. Let me know how you get on. It's nice to see someone using TF. I was thinking I'm the only one that uses it! [edit]: I've added a description of #BUF to the online glossary on TurboForth.net. Just type #BUF (or even just BUF) into the search box and it'll find it for you. Edited April 1, 2015 by Willsy Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3210156 Share on other sites More sharing options...
Opry99er Posted April 1, 2015 Share Posted April 1, 2015 I play around on TF (Classic99) all the time. Still trying to get a feel for Forth. Once I finish up the last few routines in the BR engines, I am hoping to do up some Forthy shit. Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3210355 Share on other sites More sharing options...
+Vorticon Posted August 29, 2015 Share Posted August 29, 2015 Any updates on this project? Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3310420 Share on other sites More sharing options...
Willsy Posted August 30, 2015 Share Posted August 30, 2015 Yeah I'd love to see some progress on this one! Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3310659 Share on other sites More sharing options...
lucien2 Posted August 30, 2015 Author Share Posted August 30, 2015 Hum, well, I did not touched it since april 13th. I switched my priorities and I'm finishing first my Fractals in GPL.I removed the character definitions and store them in 3 blocks, ready to load to VDP. Memory saved: ~1100 bytes.I then changed the algorithm to show the possible moves to use recursion and remove the offscreen copy of the display of possible moves. It is a bit slower to display and if you scroll the map with the possible moves displayed, it's really slower. Memory saved: ~1000 bytes.I'm thinking to translate what I have so far to a GPL/assembly mix.In any case I have a lot less time to do this than when my only wife was my computer and my only babies were my programs TI-WARS 130415.zip 2 Quote Link to comment https://forums.atariage.com/topic/180169-turboforth-game-ti-wars/page/2/#findComment-3310951 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.