Asmusr Posted March 20, 2014 Share Posted March 20, 2014 How difficult would it be to write a library like The Missing Link to provide support for some of the F18A functions in XB? You could start out with very simple stuff like unlocking the F18A, setting palette colors, one page smooth scrolling (wrapped), and a generic function for setting VDP registers. A more advanced version could add two/four page scrolling, multi-colored tiles, multi-colored sprites (if they are compatible with the console ISR?), and perhaps bitmap layer functions. With the XB compiler you could produce some pretty nice games, with features we haven't seen used in assembly yet. As far as I have figured out the trick is to reserve VDP RAM by allocating more file buffers than required for files, and then use that RAM for graphics tables instead, right? Would XB do anything nasty like resetting the VDP registers? 3 Quote Link to comment Share on other sites More sharing options...
RXB Posted March 20, 2014 Share Posted March 20, 2014 The Missing Link runs from Assembly for a good reason. It render's many features of RXB useless as it creates it's own environment to run from. But is is very well written as long as you stay in that environment and not step out of those boundaries. Access to SAMS is not possible or using BLOAD or BSAVE or access to CALL IO or some disk routines are impossible in RXB. But normal XB only functions work. So I suspect it is possible to make a verison of F18 The Missing Link. Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted March 21, 2014 Share Posted March 21, 2014 How difficult would it be to write a library like The Missing Link to provide support for some of the F18A functions in XB? You could start out with very simple stuff like unlocking the F18A, setting palette colors, one page smooth scrolling (wrapped), and a generic function for setting VDP registers. A more advanced version could add two/four page scrolling, multi-colored tiles, multi-colored sprites (if they are compatible with the console ISR?), and perhaps bitmap layer functions. With the XB compiler you could produce some pretty nice games, with features we haven't seen used in assembly yet. As far as I have figured out the trick is to reserve VDP RAM by allocating more file buffers than required for files, and then use that RAM for graphics tables instead, right? Would XB do anything nasty like resetting the VDP registers? Something like this would really get me interested in programming again if I could write programs with full 80 column text display and mapped user input similar to "ACCEPT AT". Quote Link to comment Share on other sites More sharing options...
Asmusr Posted June 29, 2014 Author Share Posted June 29, 2014 I finally made a little progress on an XB support library for the F18A. If you run F18ATEST from the attached disk on a F18A enhanced console you should see a basic demo of palette changing and smooth scrolling. F18ABASIC.dsk The functions in this demo version are limited to: CALL LINK("UNLOCK"): Unlock F18A CALL LINK("SETREG", REG, VALUE): Generic register write CALL LINK("SCROLL", X, Y): Set scroll registers CALL LINK("PAL", COLOR, R, G, B): Set palette color CALL LINK("POKEV", ADDR, VALUE): Generic VDP RAM poke (as in E/A) One obvious question is whether this can be compiled using senior_falcon's compiler, but I'm afraid I haven't tested it yet. In future versions it might be possible to add support for: 256 characters in 4 colors with support for smooth scrolling (by switching to a 'screen 2' like in XB256) A fixed overlay to the scrolling screen Bitmap overlay, up to 128x128 pixels Control of sprite/character priorities Sprite and tile flipping and mirroring Sprite linking, so that two or more sprites automatically maintain their relative position An advance collision routine that reports the numbers of the sprites that overlap Perhaps 80 columns mode? I'm only going to develop this further if it has some active users, so please let me have your expression of interest if you would consider using it. 5 Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted June 29, 2014 Share Posted June 29, 2014 I finally made a little progress on an XB support library for the F18A. If you run F18ATEST from the attached disk on a F18A enhanced console you should see a basic demo of palette changing and smooth scrolling. F18ABASIC.dsk The functions in this demo version are limited to: CALL LINK("UNLOCK"): Unlock F18A CALL LINK("SETREG", REG, VALUE): Generic register write CALL LINK("SCROLL", X, Y): Set scroll registers CALL LINK("PAL", COLOR, R, G, B): Set palette color CALL LINK("POKEV", ADDR, VALUE): Generic VDP RAM poke (as in E/A) One obvious question is whether this can be compiled using senior_falcon's compiler, but I'm afraid I haven't tested it yet. In future versions it might be possible to add support for: 256 characters in 4 colors with support for smooth scrolling (by switching to a 'screen 2' like in XB256) A fixed overlay to the scrolling screen Bitmap overlay, up to 128x128 pixels Control of sprite/character priorities Sprite and tile flipping and mirroring Sprite linking, so that two or more sprites automatically maintain their relative position An advance collision routine that reports the numbers of the sprites that overlap Perhaps 80 columns mode? I'm only going to develop this further if it has some active users, so please let me have your expression of interest if you would consider using it. Looking good from the description! I downloaded the .dsk file and I'll try to check it out after work tonight. Now the potential for an 80 column mode has me the most excited. I've had some ideas in the back of my skull, that with 80 columns could finally come to fruition. Quote Link to comment Share on other sites More sharing options...
Willsy Posted June 30, 2014 Share Posted June 30, 2014 Any chance you could share the source code when you're done with it? I'd like to see it as an example of how (and what) to write to the various registers to do things like scrolling etc. Mark Quote Link to comment Share on other sites More sharing options...
JonnyBritish Posted June 30, 2014 Share Posted June 30, 2014 You thinking about matching it with a version for Turbo Forth Mark? Quote Link to comment Share on other sites More sharing options...
matthew180 Posted June 30, 2014 Share Posted June 30, 2014 Any chance you could share the source code when you're done with it? I'd like to see it as an example of how (and what) to write to the various registers to do things like scrolling etc. Mark What is it you are looking for exactly? I'd be glad to provide short "pluggable" examples of code (assuming assembly) to access the F18A features. Scrolling is pretty easy. Two steps, the first one you always have to do once (usually during an initialization routine) in any program to get access to the F18A's enhance registers: 1. Unlock the F18A (this is a blink unlock and does not check if the system actually has an F18A): * F18A blind unlock, no testing for success or failure. * Perform the Enhance Register Mode (ERM) unlock sequence * for the F18A. LI R0,>391C * VR1/57, value 00011100 BL @VWTR * Write once BL @VWTR * Write twice, unlock . 2. Update the horz or vert scroll registers: * Update horz and vert scroll registers LI R0,>1B00 * Reg 27 horz scroll SOCB @R8LB,@R0LB * Move scroll value to R0 LSB BL @VWTR LI R0,>1C00 * Reg 28 vert scroll SOCB @R9LB,@R0LB * Move scroll value to R0 LSB BL @VWTR . In the example above the horz and vert values are kept in the LSB of R8 and R9 to make updating the scroll values easier, i.e. you can use INC or DEC, etc. I have some macros defined in my programs that let me address the LSB of the registers using names: * Workspace * WRKSP EQU >8300 * Workspace R0LB EQU WRKSP+1 * R0 low byte reqd for VDP routines R1LB EQU WRKSP+3 * R1 low byte R2LB EQU WRKSP+5 * R2 low byte R3LB EQU WRKSP+7 * R3 low byte R4LB EQU WRKSP+9 * R4 low byte R5LB EQU WRKSP+11 * R5 low byte R6LB EQU WRKSP+13 * R6 low byte R7LB EQU WRKSP+15 * R7 low byte R8LB EQU WRKSP+17 * R8 low byte R9LB EQU WRKSP+19 * R9 low byte . Of course you can do this any way you want, you simply need to write the 0-255 scroll value to the scroll register. Or course the vertical scroll values needs to be kept within 0..191 to avoid strange scroll results, but it won't hurt anything if you try to vertically scroll over 191 (which you do with ROW30 mode, which vertical scrolls form 0..239). Scrolling is very safe from XB since it only involves updating new registers above the original eight (0..7) VDP registers. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted June 30, 2014 Author Share Posted June 30, 2014 Any chance you could share the source code when you're done with it? I'd like to see it as an example of how (and what) to write to the various registers to do things like scrolling etc. Mark Since nobody seems to be interested in XB programming for the F18A I don't think I'm going to develop this project further, but you're welcome to have the current source code. F18ABasSrc.zip Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted July 1, 2014 Share Posted July 1, 2014 Since nobody seems to be interested in XB programming for the F18A I don't think I'm going to develop this project further, but you're welcome to have the current source code. Extended BASIC is the ONLY kind of programming I've ever done, but understand that you are not going to develop it any further. Pity, the potential of 80 columns in BASIC had me excited. In fact if 80 column text is all it did, with the ability to still redefine characters I'd be happy. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted July 1, 2014 Author Share Posted July 1, 2014 Extended BASIC is the ONLY kind of programming I've ever done, but understand that you are not going to develop it any further. Pity, the potential of 80 columns in BASIC had me excited. In fact if 80 column text is all it did, with the ability to still redefine characters I'd be happy. Unfortunately 80 column mode is one of the more difficult features to support in XB. It's easy enough to switch to 80 column mode: CALL LINK("SETREG",0,4) CALL LINK("SETREG",1,240) However, the screen is a pretty big mess, so you would have to write replacements for many of the XB functions. 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted July 1, 2014 Share Posted July 1, 2014 I would like to write a 80 column version of XB for the TI but refuse to even attempt such a task on anything less than 128K VDP and no Hi Res Modes. Why I started work on MESS using the EVPC mode. It would be fantastic if the F18 offered something like this. Quote Link to comment Share on other sites More sharing options...
Willsy Posted July 1, 2014 Share Posted July 1, 2014 You thinking about matching it with a version for Turbo Forth Mark? Exactly. It would make a cool development environment for F18 stuff! Quote Link to comment Share on other sites More sharing options...
Willsy Posted July 1, 2014 Share Posted July 1, 2014 Extended BASIC is the ONLY kind of programming I've ever done, but understand that you are not going to develop it any further. Pity, the potential of 80 columns in BASIC had me excited. In fact if 80 column text is all it did, with the ability to still redefine characters I'd be happy. You should have a look at Forth. Both TurboForth and fbForth support 80 column modes. And not just your running program. The entire development environment including the code editor can run in 80 columns. 40 Column mode and 32 column mode are also available. fbForth also supports bit-mapped graphics. There are alternatives to XB. Forth is so much faster than XB it's just not funny! And learning to code in Forth is not so hard. If you get stuck, there's people here (Lee, myself, Vorticon and a few others) that would only be too happy to help. Start out with a simple goal (maybe a simple game) and work your way through it. There's lots of example code on the TurboForth website to get you started. Also, there are extension libraries that can be loaded (for example, Local Variables) that can make Forth programming a lot easier and reduce the stack shuffling. Adding local variable support to TurboForth is as easy as typing 37 LOAD Quote Link to comment Share on other sites More sharing options...
Willsy Posted July 1, 2014 Share Posted July 1, 2014 Since nobody seems to be interested in XB programming for the F18A I don't think I'm going to develop this project further, but you're welcome to have the current source code. That's great - thanks!! Quote Link to comment Share on other sites More sharing options...
Willsy Posted July 1, 2014 Share Posted July 1, 2014 What is it you are looking for exactly? I'd be glad to provide short "pluggable" examples of code (assuming assembly) to access the F18A features. Thanks Matt - great stuff. Yes, a "recipe" sheet (perhaps as a sticky somewhere on the AA TI forum) would be awesome. How to do things like enable 32 sprites on a line (or turn it off), use the bitmap layer, use multi-colour sprites, change the pallete etc. I know you've talked about multi-colour sprites and characters before here on AA, but it didn't make much sense to me IIRC! Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted July 1, 2014 Share Posted July 1, 2014 Unfortunately 80 column mode is one of the more difficult features to support in XB. It's easy enough to switch to 80 column mode: CALL LINK("SETREG",0,4) CALL LINK("SETREG",1,240) However, the screen is a pretty big mess, so you would have to write replacements for many of the XB functions. COOL! I might have some time of Friday to play for an hour or two. I wrote myself a note to remind me to play with this and see how it behaves. THANX! Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted July 1, 2014 Share Posted July 1, 2014 Since nobody seems to be interested in XB programming for the F18A I don't think I'm going to develop this project further, but you're welcome to have the current source code. Please don't give up that quickly! You know the classic saying: if you build it they will come While XB is much maligned for its speed, it is still a particularly powerful Basic and adding support for the F18A will enhance it even further. XB is still the best and easiest way to start (or get back into) programming on the TI. Add to that Harry's compiler and your F18A enhancements and it becomes an extremely attractive package. Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted July 1, 2014 Share Posted July 1, 2014 This package comes with some GREAT documentation..... Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted July 2, 2014 Share Posted July 2, 2014 This package comes with some GREAT documentation..... You get a gold star for actually reading the docs!!! Quote Link to comment Share on other sites More sharing options...
Omega-TI Posted July 2, 2014 Share Posted July 2, 2014 You get a gold star for actually reading the docs!!! Thanks. I printed them all up, but had to make a better cover. TML-COVER.pdf 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.