Jump to content
IGNORED

PICO9918 - a TMS9918A drop-in replacement powered by a Pi Pico (RP2040)


Recommended Posts

Looks like I forgot to reset the "GPU running flag" - to stop the GPU before setting the restart flag (the doco that's available says writing the low GPU address register triggers a full restart) - missing line highlighted in yellow:

image.thumb.png.5bc476ffd0a6ef60775d83fc290be1f9.png

I also changed main() to only save/scan the first 8 VDP registers (instead of 64) - since being locked prevents any others from changing anyway.

 

Testing other F18A software shows the other methods of F18A detection still need to be implemented (the write only register to specify which status register to read, I guess, but that's crossing over into an area of code best left for @visrealm when he's back from leave).  .uf2 firmware attached.

pico9918.zip

  • Like 5
Link to comment
Share on other sites

On 8/27/2024 at 7:26 PM, JasonACT said:

Testing other F18A software shows the other methods of F18A detection still need to be implemented (the write only register to specify which status register to read, I guess, but that's crossing over into an area of code best left for @visrealm when he's back from leave).  .uf2 firmware attached.

I wanted to clean up my restart and locked variables which were a quick hack, so they are now in the main Pico9918 struct.  While I was at it, I made the changes needed for other software to detect a F18A, along with setting some of the status registers and scanline/blanking memory addresses.  I did the sprite limit register too, what is that even for?  Anyway, a rhetorical question, the GPU should be pretty usable in the standard graphics modes now.  Not to mention there's almost 64KB of RAM available to it as well (check out the main struct to see where GPU code can currently go).

 

pico9918-dev.zippico9918.zip

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

On 8/20/2024 at 12:10 AM, visrealm said:

My Tindie page is live now and I've just made some initial stock available to purchase.

 

Note: I'm going away for a week from this weekend (back on September 1st), so I've only made available the quantity I'm confident I can ship before this weekend while also being able to ship stock to @arcadeshopper. There's a chance I'll put more up later in the week.

 

US/Canada: For now, I've disabled shipping to US/Canada to give a chance for Arcade Shopper's stock to arrive. 

 

image.thumb.png.537ff06a4c73fcc90547d592a4a609a6.png

 

Store link: PICO9918 from Troy Schrapel on Tindie

 

https://www.arcadeshopper.com/wp/store/#!/Pico9918-V1-0-VDP-replacement/p/692136720/category=0

  • Like 2
Link to comment
Share on other sites

On 8/30/2024 at 6:12 AM, Stuart said:

You can add the Powertran Cortex and my homebrew TM990 video card to the list of compatible computers.  ;-)

 

I've now updated the GitHub repo with both of these :) Thanks, @Stuart.

 

Also, if anyone else tests on any other system, I would love to add it to the supported devices list.

 

I will also add it to the Unsupported devices list if it doesn't work. So far, that list is empty, but I'm sure there will be some machines it doesn't work on for whatever reason.

  • Like 1
Link to comment
Share on other sites

On 8/29/2024 at 6:47 PM, JasonACT said:

I wanted to clean up my restart and locked variables which were a quick hack, so they are now in the main Pico9918 struct.  While I was at it, I made the changes needed for other software to detect a F18A, along with setting some of the status registers and scanline/blanking memory addresses.  I did the sprite limit register too, what is that even for?  Anyway, a rhetorical question, the GPU should be pretty usable in the standard graphics modes now.  Not to mention there's almost 64KB of RAM available to it as well (check out the main struct to see where GPU code can currently go).

 

pico9918-dev.zip 3.93 MB · 7 downloads pico9918.zip 13.51 kB · 8 downloads

Thanks again Jason. I've created a new branch for this so I can start playing around with it.

 

visrealm/pico9918 at gpu-dev (github.com)

 

Also a new vrEmuTms9918 branch linked. 

 

  • Like 3
Link to comment
Share on other sites

Thanks again to @JasonACT for the TMS9900 GPU code, I've had a bit of a go at implementing some of the enhanced display features of the F18A... with mixed results. 

 

Here's a couple of short videos showing the progress.

 

 

The flickery scanlines are occurring when it ran out of time to generate a scanline, so effectively skips an odd or even scanline, reusing the previous odd or even scanline.

 

So far, I've implemented the palette registers, 30 row mode, dual tile layers, x and y scroll registers, horizontal and vertical pages, ecm/bit planes for tile map layers. Something seems awry with tile2 scrolling??  Also, keep in mind, I've never written software for the F18A (nor do I have one to test against), so it's all quite new to me. Lots of trial and error.

 

Still quite a bit to go, and as seen above, we're out of render headroom without some optimization of the existing render code.

Edited by visrealm
  • Like 7
Link to comment
Share on other sites

1 hour ago, visrealm said:

So far, I've implemented the palette registers, 30 row mode, dual tile layers, x and y scroll registers, horizontal and vertical pages, ecm/bit planes for tile map layers. Something seems awry with tile2 scrolling??  Also, keep in mind, I've never written software for the F18A (nor do I have one to test against), so it's all quite new to me. Lots of trial and error.

Did you implement the HSYNC GPU trigger? That's very important for both Mario and Zaxxon.

Edited by Asmusr
  • Like 1
Link to comment
Share on other sites

Did a bit more on it this morning. I've implemented hsync and vsync GPU triggers, which did... some... stuff.

 

Also tried out processing the tilemap bitplanes 4 pixels (one nibble) at a time using my old mate, the lookup table. :D

 

Check it out here:

 

The lookup table is 8kB, mapping up to 3x bitplane nibbles (16^3) to a 16-bit value containing 4x 4-bit pixel color values which can be combined with the ecm-level palette. 

 

Still many other issues going on, but... the results are seriously impressive! Well... I'm impressed anyway. :)  It's given me a glimmer of hope this might be possible.

  • Like 4
Link to comment
Share on other sites

I think I'm missing a start page setting. I've uploaded a video showing @Asmusr's ECM3 scrolling demo, and it looks like it should be swapping pages, but I'm not doing it.  I think that would explain the super mario weirdness too.

 

 

I've attached the documentation I'm working from and it might be outdated or missing some stuff. In the PDF, there is mention of a "start page" setting, but I can't find it anywhere.  Does anyone have better documentation?

f18a_register_use.ods F18A documentation.pdf

  • Like 3
Link to comment
Share on other sites

50 minutes ago, visrealm said:

I've attached the documentation I'm working from and it might be outdated or missing some stuff. In the PDF, there is mention of a "start page" setting, but I can't find it anywhere.  Does anyone have better documentation?

That's the same doco I have.

 

This brought up 3 hits though:

https://forums.atariage.com/search/?q="start page"&quick=1&type=forums_topic&item=207586

  • Like 2
Link to comment
Share on other sites

1 hour ago, visrealm said:

Ah. that was it. It is mentioned in the PDF, but I missed it:

VR2:
MSB                LSB
0  1  2  3  4  5  6   7
X  X  X  X A0 A1  A2  A3 - Normal
X  X  X  X A0 A1 VPS HPS - Vertical / Horizontal Page Start from VR29

Thanks, Jason.

The documentation about scrolling is outdated. Scroll limit registers and fixed map no longer exists.

 

Maybe you can get some hints from the Js99er source code?

https://github.com/Rasmus-M/js99er-angular/blob/master/assembly/f18a.ts

https://github.com/Rasmus-M/js99er-angular/blob/master/src/app/emulator/classes/f18a.ts  

  • Like 4
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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   1 member

×
×
  • Create New...