Jump to content
speccery

Icy99 FPGA 99/4A

Recommended Posts

A quick update: I have been working together with the ULX3S developers to make the icy99 implementation on the ULX3S FPGA board better. emard and lawrie have been testing the TI-99/4A core. emard added support for the screen overlay feature he is using with many other retro computer implementations. The cool thing is that this is running on an ESP32 micro controller running micropython. The overlay screen already allows loading of ROM images from SD card. When I have time I will continue to work on the core itself, for instance to add support for disk subsystem with the ESP32. I can probably reuse some of the code I created for my ET-PEB project.

 

In the process I accidentally broke my FPGA board, the primary micro USB socket became loose and broke the PCB pads in the process. Luckily I could fix this with a new micro USB connector, as it is the same connector used in my StrangeCart board. Some pictures are here in the gallery.

Share this post


Link to post
Share on other sites

I just remembered that I wanted to ask how much 9938 VDP features I would have to add to support 80 columns text mode? For example to support fbForth or TurboForth with 80 columns? I hope that this would not require too many additions. Internally my VDP core already renders pixels to a 512 pixel wide buffer, so the underlying engine has been partially designed with 80 columns in mind.

To be more specific, I guess what I am asking is that what extended registers I would need to add to support simple 80 column mode?

Share this post


Link to post
Share on other sites
1 hour ago, speccery said:

I just remembered that I wanted to ask how much 9938 VDP features I would have to add to support 80 columns text mode? For example to support fbForth or TurboForth with 80 columns? I hope that this would not require too many additions. Internally my VDP core already renders pixels to a 512 pixel wide buffer, so the underlying engine has been partially designed with 80 columns in mind.

To be more specific, I guess what I am asking is that what extended registers I would need to add to support simple 80 column mode?

 

TurboForth and fbForth set 15 VDP registers (VR00 – VR14) to effect 80-Column Text mode for both the F18A and the V9938—so, 7 additional registers.

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Lee Stewart said:

 

TurboForth and fbForth set 15 VDP registers (VR00 – VR14) to effect 80-Column Text mode for both the F18A and the V9938—so, 7 additional registers.

 

...lee

What is the reason for setting all those registers? I would have answered that he only needed to support one extra bit of register 0 (bit weight >04).

  • Like 1

Share this post


Link to post
Share on other sites
26 minutes ago, Asmusr said:

What is the reason for setting all those registers? I would have answered that he only needed to support one extra bit of register 0 (bit weight >04).

 

It looks like VR10 and VR11 are all that may be needed for the F18A (not absolutely sure about that), but the 9938 definitely needs most or all of VR08 – VR14 managed. Otherwise, you get undesirable behaviour like blinking text, etc. I believe Tim (@InsaneMultitasker) worked out these details for Mark Wills (@Willsy) for TurboForth, which is where I got them for fbForth.

 

...lee

Share this post


Link to post
Share on other sites
Posted (edited)
7 minutes ago, Lee Stewart said:

 

It looks like VR10 and VR11 are all that may be needed for the F18A (not absolutely sure about that), but the 9938 definitely needs most or all of VR08 – VR14 managed. Otherwise, you get undesirable behaviour like blinking text, etc. I believe Tim (@InsaneMultitasker) worked out these details for Mark Wills (@Willsy) for TurboForth, which is where I got them for fbForth.

 

...lee

VR10 and VR11 on the F18A are for setting name table and color table of tile layer 2. They are not needed to set 80 color mode. If the F18A is locked you will address VR2 and VR3 instead.

Edited by Asmusr
  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, Asmusr said:

VR10 and VR11 on the F18A are for setting name table and color table of tile layer 2. They are not needed to set 80 color mode. If the F18A is locked you will address VR2 and VR3 instead.

 

Nevertheless, the settings for VR08 – VR14 were designed to allow setup of 80-Column Text mode without needing to know which VDP, F18A or V9938, was installed.

 

...lee

Share this post


Link to post
Share on other sites
3 hours ago, Lee Stewart said:

 

It looks like VR10 and VR11 are all that may be needed for the F18A (not absolutely sure about that), but the 9938 definitely needs most or all of VR08 – VR14 managed. Otherwise, you get undesirable behaviour like blinking text, etc. I believe Tim (@InsaneMultitasker) worked out these details for Mark Wills (@Willsy) for TurboForth, which is where I got them for fbForth.

 

...lee

If the program is being written to work with both the F18A and 9938 80 column modes, then yes, you need to account for VR8-VR14.  It is typically safe to reset most of these registers (i.e., load with 0x00) prior to setting VR0-7. 

 

The V9938 has a 26.5 line text mode so if people write for 30 line mode, that will exclude 9938 usage.  This may or may not be a desired outcome depending on the audience and intent. Also, if you plan to use the color attributes in the F18A 80 column text mode, the only way to mirror this in the 9938 is to use its bitmap graphics mode. 

  • Like 2

Share this post


Link to post
Share on other sites

Just curious. Can I ask how you got your ULX3S board?

Did you build it yourself or is there a possibility to get fully assembled boards?

Checked, but could not find anything. Thanks

Share this post


Link to post
Share on other sites
12 hours ago, Lee Stewart said:

 

Nevertheless, the settings for VR08 – VR14 were designed to allow setup of 80-Column Text mode without needing to know which VDP, F18A or V9938, was installed.

 

...lee

Are you detecting if an V9938/F18A is present or are you setting these registers blindfolded? I think in addition to the bit in VR0 @speccery might have to support detection.

Share this post


Link to post
Share on other sites
5 hours ago, Asmusr said:

Are you detecting if an V9938/F18A is present or are you setting these registers blindfolded? I think in addition to the bit in VR0 @speccery might have to support detection.

 

The settings are unconditional. I have had no problem with the real F18A or with the V9938 emulated by MAME.

 

...lee

Share this post


Link to post
Share on other sites
Posted (edited)

I forgot that the F18A firmware 1.8 and above ignores writes to VR8 and above if 80 columns mode is selected and it's not unlocked. So that's why it doesn't hurt to write to VR8-VR15 on the F18A. On the V9938 those regs have the following meaning:

  • VR8: Mouse, light pen, sprite disable, etc
  • VR9: Vertical line count and other output related bits
  • VR10: Color table high
  • VR11: Sprite attribute table high
  • VR12: Text and background blink color
  • VR13: Blinking period register
  • VR14: VRAM access base register
  • VR15: Status register pointer

To implement a simple 80 column x 24 row mode, I think all of these can be ignored. The only issue is if software uses VR15 to set status register 1 in order to detect the V9938 or F18A, then that would have to be implemented. 

Edited by Asmusr
  • Like 1

Share this post


Link to post
Share on other sites
42 minutes ago, Asmusr said:

The only issue is if software uses VR15 to set status register 1 in order to detect the V9938 or F18A, then that would have to be implemented. 

 

I do not mess with VR15.

43 minutes ago, Asmusr said:

To implement a simple 80 column x 24 row mode, I think all of these can be ignored.

 

They cannot be ignored. I am pretty sure I tried. I would need to retest to be certain. What I have set were tweaked by Tim (@InsaneMultitasker) and Michael (@mizapf) several years ago. Below are what are set for fbForth and TurboForth:

VDPreg  fbF  TF
------  ---  ---
VR00    >04  >04
VR01    >F0  >70
VR02    >03  >03
VR03    >E8  >E8
VR04    >01  >01
VR05    >06  >06
VR06    >01  >00
VR07    >4F  >F4
VR08    >88  >88
VR09    >00  >00
VR10    >00  >00
VR11    >00  >00
VR12    >4F  >94
VR13    >10  >10
VR14    >00  >00

 

...lee

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, Lee Stewart said:

They cannot be ignored. I am pretty sure I tried. I would need to retest to be certain. What I have set were tweaked by Tim (@InsaneMultitasker) and Michael (@mizapf) several years ago. Below are what are set for fbForth and TurboForth:

Please, I'm not talking about what you should do but which registers @speccery would have to implement to support 80 columns. You're enabling the mouse and setting a bit related to the VRAM organisation, but speccery can ignore that if he supports neither. And then you're setting some blinking options that he probably doesn't want to support either. I think he still only needs to support the mode bit in VR0.

Edited by Asmusr
  • Like 2

Share this post


Link to post
Share on other sites
33 minutes ago, Asmusr said:

Please, I'm not talking about what you should do but which registers @speccery would have to implement to support 80 columns. You're enabling the mouse and setting a bit related to the VRAM organisation, but speccery can ignore that if he supports neither. And then you're setting some blinking options that he probably don't want to support either. I think he still only needs to support the mode bit in VR0.

 

That certainly makes sense—just as long as nothing untoward happens when writing to nonexistent VDP registers, such as what would happen if register numbers are masked to allow only the low-order 3 bits. In fbForth and TurboForth, it is presumed that the user knows whether they have an 80-column-capable VDP. If they choose 80-column text mode with a TMS9918A, the system will go off into the weeds precisely because higher-order register-number bits are masked out by the TMS9918A. As I said, if the same thing were to happen with @speccery’s VDP implementation of 80-column text mode, the above Forths will fail.

 

...lee

Share this post


Link to post
Share on other sites
3 minutes ago, Lee Stewart said:

 

That certainly makes sense—just as long as nothing untoward happens when writing to nonexistent VDP registers, such as what would happen if register numbers are masked to allow only the low-order 3 bits. In fbForth and TurboForth, it is presumed that the user knows whether they have an 80-column-capable VDP. If they choose 80-column text mode with a TMS9918A, the system will go off into the weeds precisely because higher-order register-number bits are masked out by the TMS9918A. As I said, if the same thing were to happen with @speccery’s VDP implementation of 80-column text mode, the above Forths will fail.

 

...lee

Right, so he could implement the same solution as the F18A, which is to mask to 3 bits unless the 80 columns mode is selected, in which case writes to registers >= 8 are ignored.

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, Asmusr said:

Right, so he could implement the same solution as the F18A, which is to mask to 3 bits unless the 80 columns mode is selected, in which case writes to registers >= 8 are ignored.

 

Definitely!

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites
On 6/25/2020 at 6:47 AM, retroclouds said:

Just curious. Can I ask how you got your ULX3S board?

Did you build it yourself or is there a possibility to get fully assembled boards?

Checked, but could not find anything. Thanks

See here:

https://www.crowdsupply.com/radiona/ulx3s

 

Share this post


Link to post
Share on other sites
On 6/25/2020 at 7:47 AM, retroclouds said:

Just curious. Can I ask how you got your ULX3S board?

Did you build it yourself or is there a possibility to get fully assembled boards?

Checked, but could not find anything. Thanks

I bought mine directly from them, by e-mailing the contacts I got from @pnr. There is also crowd supply campaign at https://www.crowdsupply.com/radiona/ulx3s, and I did order another one probably around 6 months ago. Their delivery schedule has slipped, and is now supposed to be in August. I believe you can order directly from there.

 

And as I wrote this while catching up the thread, I see that the question was already answered... Self assembling the ULX3S is not an easy option, as the ECP5 FPGA is BGA chip, and there are a ton of other components on this board.

Share this post


Link to post
Share on other sites
On 6/25/2020 at 5:35 PM, Asmusr said:

I forgot that the F18A firmware 1.8 and above ignores writes to VR8 and above if 80 columns mode is selected and it's not unlocked. So that's why it doesn't hurt to write to VR8-VR15 on the F18A. On the V9938 those regs have the following meaning:

  • VR8: Mouse, light pen, sprite disable, etc
  • VR9: Vertical line count and other output related bits
  • VR10: Color table high
  • VR11: Sprite attribute table high
  • VR12: Text and background blink color
  • VR13: Blinking period register
  • VR14: VRAM access base register
  • VR15: Status register pointer

To implement a simple 80 column x 24 row mode, I think all of these can be ignored. The only issue is if software uses VR15 to set status register 1 in order to detect the V9938 or F18A, then that would have to be implemented. 

Thanks @Asmusr this is what I was looking for! I would initially be looking to implement a super simple 80x24 mode - but still something that at least some software can directly utilize, it can be made fancier later. It would be a nice addition to the icy99 code base. If it as simple as adding one more bit, this should not take long at all to implement (if I had some time,  but that is another story).

Share this post


Link to post
Share on other sites
On 6/25/2020 at 8:09 PM, Asmusr said:

Right, so he could implement the same solution as the F18A, which is to mask to 3 bits unless the 80 columns mode is selected, in which case writes to registers >= 8 are ignored.

 

Thanks for the comments @Asmusr and @Lee Stewart. I quickly looked at my code, and currently it is only looking at the 3 LSB bits for register selection, but expanding that is trivial. I actually have already extended the interface to my TMS9918 last year, so that instead of the VDP only decoding one bit from address bus, I have a 8-bit address bus and support a bunch of 16-bit registers which can be read by the CPU. For reading, in addition to reading from address 8800 and 8802,  with my VDP there are 16-bit wide registers in the range 8880..88A0, enabling reading back all registers, with proper bit shifts to have the direct VRAM addresses for all tables, and additionally the VRAM pointer can be read, the screen refresh row and column, whether the display is in the blanking area, plus some debug stuff.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...