+retroclouds Posted November 4, 2017 Share Posted November 4, 2017 (edited) I'm trying to get the F18A 80 columns mode code working in my spectra2 library. Although it is currently working up to a certain extend, I'm having some glitches. 1. Can someone show me where I can find working assembly sample code for 80 columns mode ? 2. Besides controlling the VDP#0 and VDP#1 registers, is there anything else I need to honour in terms of PNT size, location, etc. ? 3. How does color setup work in 80 columns mode? 3. Do sprites work in F18A 80 columns mode or is this supposed to be a plain text mode ? 4. Are there any 80 columns fonts included in the F18A itself ? ? 5. Are there besides the 80 columns mode other modes available (e.g. 64 columns mode with graphic support?) Thanks for the help guys :-) Edited November 4, 2017 by retroclouds Quote Link to comment Share on other sites More sharing options...
Asmusr Posted November 4, 2017 Share Posted November 4, 2017 I'm trying to get the F18A 80 columns mode code working in my spectra2 library. Although it is currently working up to a certain extend, I'm having some glitches. 1. Can someone show me where I can find working assembly sample code for 80 columns mode ? 2. Besides controlling the VDP#0 and VDP#1 registers, is there anything else I need to honour in terms of PNT size, location, etc. ? 3. How does color setup work in 80 columns mode? 3. Do sprites work in F18A 80 columns mode or is this supposed to be a plain text mode ? 4. Are there any 80 columns fonts included in the F18A itself ? ? 5. Are there besides the 80 columns mode other modes available (e.g. 64 columns mode with graphic support?) Thanks for the help guys :-) 1. I have found these demos. No longer sure exactly what they do. 2. You need to set the name and pattern tables, of course. 3. Hmm, lots of options. If you turn on position based attributes, for instance, you can set the color for each character on the screen independently. I'm sure it's explained somewhere in the F18A thread. 3. Yes you can use sprites if you unlock the F18A first. 4. Not sure, perhaps it's possible to load a font from the flash memory? 5. No posattr.a99 wimp.a99 2 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 5, 2017 Share Posted November 5, 2017 I'll dig up some code tomorrow and post it. When the F18A is locked, 80-column mode works according to the way the 9938 does it, so primarily just setting the proper bits in VR0 and VR1. Name, pattern, and color table setup is the same as it would be for the 9938, albeit with only 16K of VRAM (obviously). It is primarily the same as 40-column mode, but the name table is bigger. However, if the F18A is unlocked then other options are available: 1. Sprites are active and stay on a 256x192 grid, even though tiles are 512x192 grid. 2. The bitmap-layer is available on a 256x192 grid. 3. The 30-row mode is available (makes the name table even larger). 4. The pixel scroll registers are functional, however they only work to scroll 0..7 pixels. 5. The position-based colors are available. This allows each tile to have its own foreground and background colors. This works by setting up another table that is the same size as the name table, and each byte contains the fg/bg color for the corresponding tile. 6. Enhance color palettes are available. There are no 40/80 column fonts in the flash, sorry, it never occurred to me to include those kinds of fonts. No other graphic "modes". However, GM1 on the F18A is very enhanced with two independent tile layers available (each has its own name and color table, scroll registers, etc.), tile attributes, priority over sprites, etc. 2 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted November 5, 2017 Share Posted November 5, 2017 4. The pixel scroll registers are functional, however they only work to scroll 0..7 pixels. Are you sure? My recollection is that you can scroll the full range. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 5, 2017 Author Share Posted November 5, 2017 (edited) Rasmus and Matthew, thank you for the demo and details. I'm going to do some more tests and have some fun :-) Below is a screenshot of the "wimp" demo Edited November 5, 2017 by retroclouds 2 Quote Link to comment Share on other sites More sharing options...
Willsy Posted November 5, 2017 Share Posted November 5, 2017 TurboForth loads R0 to R15 with the followeing values (this assumes a locked F18A) and works fine: >04,>70,>03,>e8,>01,>06,>00,>f4,>88,>00,>00,>00,>94,>10,>00 HTH Mark Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 7, 2017 Share Posted November 7, 2017 Are you sure? My recollection is that you can scroll the full range. No, I'm not totally sure, since I never wrote any detailed docs after reimplementing this a half-a-dozen times... :-( I know initially I just ignored the effects of scrolling in T40 and T80 mode, until I did the V1.6 rewrite and the addition of TL2. At that point, since I was reworking the entire tile FSM, I made sure that T40 and T80 could be scrolled to some degree (at the very least 0..7). I can say for certain that T40 and T80 do not support the multiple horizontal / vertical name tables like GM1, but they may support scrolling beyond 7 pixels. I'll have to recheck the HDL and/or test it to be sure. Oh, and look, it is *way* past "tomorrow" when I said I would have additional example code... My apologizes for that. The demos Rasmus put together are probably the best available examples. Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted November 7, 2017 Share Posted November 7, 2017 TIMXT uses a DMA copy to scroll the screen; you helped me set that up. If I remember correctly, scrolling the attributes required a second DMA copy. 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.