Jump to content

Photo

F18A 80 columns mode sample code?

f18a tms9900

7 replies to this topic

#1 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,537 posts
  • Location:Germany

Posted Sat Nov 4, 2017 9:16 AM

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 by retroclouds, Sat Nov 4, 2017 9:23 AM.


#2 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,465 posts
  • Location:Denmark

Posted Sat Nov 4, 2017 10:58 AM

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

Attached Files



#3 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,408 posts
  • Location:Castaic, California

Posted Sat Nov 4, 2017 8:58 PM

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.



#4 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,465 posts
  • Location:Denmark

Posted Sun Nov 5, 2017 2:24 AM

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.



#5 retroclouds OFFLINE  

retroclouds

    Stargunner

  • Topic Starter
  • 1,537 posts
  • Location:Germany

Posted Sun Nov 5, 2017 5:57 AM

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

 

Attached File  wimp.PNG   133.5KB   1 downloads


Edited by retroclouds, Sun Nov 5, 2017 6:14 AM.


#6 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,021 posts
  • Location:Uzbekistan (no, really!)

Posted Sun Nov 5, 2017 10:59 AM

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



#7 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,408 posts
  • Location:Castaic, California

Posted Tue Nov 7, 2017 3:06 PM

 

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.



#8 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,731 posts

Posted Tue Nov 7, 2017 3:28 PM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users