6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 28, 2024 7:30 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jun 25, 2022 12:33 am 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
Hey, all. I just finished the main text and graphics routines for this library for 4D System's Serial Environement for Picaso based modules, including uVGA. Perusing the forum, I see that, in days gone by, there was some interest in these modules. But, I couldn't find a library of serial commands that I could use via a simple ACIA setup. So, I started writing one. Like I said, above, I've only done text and graphics routines so far, but I plan to keep working on it. Perhaps I can even get a cursor working ;-)

Anyway, enjoy, and I look forward to any feedback, including criticism! Also, feel free to make changes and improvements, if you're interested. I know this code can be lighter and more efficient.

Thanks!

Jonathan

https://github.com/jmstein7/uVGA_65C02_Serial_Library

I use Retro Assembler on Visual Studio Code: https://enginedesigns.net/retroassembler


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 6:14 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Thanks for sharing!


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 8:10 am 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
I started a similar effort for my 4D Systems Diablo16 display and then realized that it was more efficient to program the display directly. This off loads a lot of the video work to the display. Now I simply send a serial stream of text to the display for it to process. I programmed the display to handle some standard escape codes for cursor control and some custom codes for specific display functions such as graphics and media. It also controls a blinking cursor.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 11:23 am 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
BigEd wrote:
Thanks for sharing!

Of course! Glad to be able to "give back" :D

PS Made a minor fix to the Text Attributes Set and Reset routines, this morning. That's in the file "picaso_routines.inc".


Last edited by Jmstein7 on Sat Jun 25, 2022 11:44 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 11:26 am 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
tmr4 wrote:
I started a similar effort for my 4D Systems Diablo16 display and then realized that it was more efficient to program the display directly. This off loads a lot of the video work to the display. Now I simply send a serial stream of text to the display for it to process. I programmed the display to handle some standard escape codes for cursor control and some custom codes for specific display functions such as graphics and media. It also controls a blinking cursor.

It would be nice if there was a Diablo16 to VGA unit, like uVGA. Or even Diablo16 to HDMI.

I wasindeed wondering how one might go about offloading to the EVEs, especially because I want to be able to use the parallel busses.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 2:17 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
Jmstein7 wrote:
I was indeed wondering how one might go about offloading to the EVEs, especially because I want to be able to use the parallel busses.

The Picaso processor doesn't have as much SRAM and flash as the Diablo16, but otherwise it looks very similar to it. Dig into the 4D Workshop4 IDE examples and 4D Systems App Notes for programming ideas. There are quite a few for the Picaso. It's pretty straight forward once you figure out the 4D System way of doing things.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 9:00 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
tmr4 wrote:
The Picaso processor doesn't have as much SRAM and flash as the Diablo16, but otherwise it looks very similar to it. Dig into the 4D Workshop4 IDE examples and 4D Systems App Notes for programming ideas. There are quite a few for the Picaso. It's pretty straight forward once you figure out the 4D System way of doing things.

You mean "Designer" projects, right? Not ViSi or any of the other shortcuts? Jonathan


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 25, 2022 10:38 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
Jmstein7 wrote:
You mean "Designer" projects, right? Not ViSi or any of the other shortcuts? Jonathan

Yes, I'm referring to the Designer projects. Looks like there are many example projects for the Picaso included with the 4D Workshop4 IDE, way more than for the Diablo16. The terminal project, 4D Labs\Picaso Designer\PICASO - GENERAL\TERMINAL.4DG, looks like a good place to start a simple display output. Looks like it's for a touch enabled display, but you can just delete the stuff your display doesn't support. It's pretty easy to customize once you get to know their system/language.

You'll want to download the internal functions manual and the Designer 4DGL Programmer's Reference Manual at the Picaso download page.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 26, 2022 7:56 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
I just fixed some bugs in the graphics commands and started adding in the FAT16 commands.

https://github.com/jmstein7/uVGA_65C02_Serial_Library

However, I'm having trouble with files reading/writing. If anyone wants to take a look and find the bugs (anywhere therein), I could really use a second set of eyes. On the bright side, the text and graphics commands are tested and working. Everything else is gravy, as they say!

Jonathan


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 1:04 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
tmr4 wrote:
Yes, I'm referring to the Designer projects. Looks like there are many example projects for the Picaso included with the 4D Workshop4 IDE, way more than for the Diablo16. The terminal project, 4D Labs\Picaso Designer\PICASO - GENERAL\TERMINAL.4DG, looks like a good place to start a simple display output. Looks like it's for a touch enabled display, but you can just delete the stuff your display doesn't support. It's pretty easy to customize once you get to know their system/language.

You'll want to download the internal functions manual and the Designer 4DGL Programmer's Reference Manual at the Picaso download page.


Yes. The thing about the Serial mode is that you can't really access all the internal functions. For example, you can't load variables from the parallel bus, or anything, into the Picaso memory. If you read or write the bus in Serial mode, it just sends it back over serial after the ack.

Makes no sense. Bad design choice.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 2:36 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
Jmstein7 wrote:
Yes. The thing about the Serial mode is that you can't really access all the internal functions. For example, you can't load variables from the parallel bus, or anything, into the Picaso memory. If you read or write the bus in Serial mode, it just sends it back over serial after the ack.

Makes no sense. Bad design choice.

Yes the serial environment is pretty limited which is why I switched to the designer environment. It gives access to all internal functions. Best would be a combination of the two, but that's not possible.

I haven't used many features on my display, just terminal support and storage. In many ways the display is significantly more powerful than the SBC I'm building. However, my 65xx builds can spit out data way faster than the display can process. I have a pretty big buffer on the display for input and even that at times isn't enough.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 6:20 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
tmr4 wrote:
Yes the serial environment is pretty limited which is why I switched to the designer environment. It gives access to all internal functions. Best would be a combination of the two, but that's not possible.

I haven't used many features on my display, just terminal support and storage. In many ways the display is significantly more powerful than the SBC I'm building. However, my 65xx builds can spit out data way faster than the display can process. I have a pretty big buffer on the display for input and even that at times isn't enough.

Do you send in data through Serial, or do you use the GPIO BUS for that?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 7:28 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
Jmstein7 wrote:
Do you send in data through Serial, or do you use the GPIO BUS for that?

I connect to my display with serial over a 65C51. The Diablo16 allows you to identify which GPIO pins to use. It has up to 4 communication channels. I use the Diablo16 internal serial (UART) communication functions (similar to the Picaso, see section 2.11 of the internal functions manual). It looks like the Picaso has most of the functions available on the Diablo16. Missing on the Picaso are the multiple com channels and block transfers. I use both of those.

I haven't played with the general GPIO functions. I'm happy with a simple two wire serial connection. But that doesn't limit you to only internal serial functions. For example, I've implemented the standard escape codes to clear the page, move the cursor to a specific row/col and hide/show the cursor. I've also developed my own custom escape code, ESC Bn, to load block n from the display's SD card.

Handling these over a serial interface is simple with a switch/case structure. This also handles special characters like backspace and carriage return. The 65xx doesn't need to know anything about the display, it just sends text, including any special characters/codes to control the presentation if necessary. Otherwise the display's program controls the presentation, like linefeeds and scrolling.

Escape codes cover quite a lot, but are terminal based. This is fine for me but could be limiting in more graphical applications. I don't think the 4d System uVDA is ideal for a graphic intensive system though. I use a number of internal graphics functions to scroll the text on my display. They meet my needs, but they aren't very fast by today's standards.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 11:03 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
tmr4 wrote:
I connect to my display with serial over a 65C51. The Diablo16 allows you to identify which GPIO pins to use. It has up to 4 communication channels. I use the Diablo16 internal serial (UART) communication functions (similar to the Picaso, see section 2.11 of the internal functions manual). It looks like the Picaso has most of the functions available on the Diablo16. Missing on the Picaso are the multiple com channels and block transfers. I use both of those.


Agreed. I would use those, too. What kills it for me are the ACKs, over serial. I use a blocking ACIA routine, but, for some reason, my ACKs, and the data that follows them, are sort of messy. They usually work, but sometimes, when I really need the data being returned after the ACK, it can be difficult. Especially once I started dabbling with the FAT16 stuff. 0x06 everywhere.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 27, 2022 11:58 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
I don't recall having problems with ACKs but I might not have gotten as far as you. I realized after a while that the 6502 was doing too much work managing the display and it would be simpler just having the smart display manage it (backspace comes to mind). And if I recall there are some things you just can't do in the Serial Environment (or was that just the Serial Commander App?). It was likely at that point that I changed my approach.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: