6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Nov 13, 2024 7:00 am

All times are UTC




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Tue Sep 24, 2024 4:28 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 962
Location: Potsdam, DE
Theory...
Attachment:
Screenshot from 2024-09-24 18-24-28.png
Screenshot from 2024-09-24 18-24-28.png [ 180.61 KiB | Viewed 435 times ]


Practice:
Attachment:
1727194831894.jpg
1727194831894.jpg [ 577.29 KiB | Viewed 435 times ]


But at least it does something: video comes out, keyboard goes in, and it _looks_ as if it's at least trying to do the initial program load. However, it's clearly not working properly though something is being executed; I need to slow things down and check the sequence at each point in the load.

And I still need to write the pio code to make the pico into a bus device...

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 30, 2024 12:36 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 674
Location: Gillies, Ontario, Canada
Cool setup. Is the PI going to take graphics commands from the 6502 or are you going with a memory mapped segment in that other 32k space?
I am also curious as to your PI toolchain. I have a few 2040's but could not find a comfortable toolchain that would allow me to use Visual Studio and C#.
Instead I found the Teensy 4.0 and 4.1 and have never looked back.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 30, 2024 5:00 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 962
Location: Potsdam, DE
The Pi will take graphic (and text) commands from the 65c02. [The plan is that] it will have just two memory addresses in the IO space; one which reads as a status byte and writes as a register select, and the other which reads and writes the selected register.

So as the basic operation, one writes the selector for (e.g. terminal function) and then read for busy, then write the terminal data; repeated writes require the busy read (or a delay; writing a character to the terminal, updating the cursor position and such, takes about eight microseconds) but not reselecting the function. So it looks much the same as writing to a serial port.

The tool chain at the moment is Arduino; it offers a simple interface to select things like processor speed. But it's language is sorta C (which I like) or C++ (which I don't). The advantage is that all the libraries and stuff is in there; the disadvantage is that the UI is horrible - no scaling for screen size, so e.g. tab labels are minuscule on a large screen, and very low contrast colours on those tab labels. There's no obvious way to say which files are included in the build (it looks like every file in the build has to be open in the editor, and every file in the editor finds its way into the build...) and the language doesn't seem to follow include rules the way I expect (which might just be me...)

I did try with the Visual Editor (on Linux) but I really didn't get on with it. Too much choice, not enough 'just do this', and bloody helpful messages with a bad habit of popping up right where they obscure just what I'm looking at.

Neil

(p.s. because I keep forgetting to set the processor speed, I can report that VGA timing which is exact at 125MHz also works without issue on my LCD monitor at 133MHz, so 5% fast. Probably a benefit of its analogue roots)


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 30, 2024 2:30 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 674
Location: Gillies, Ontario, Canada
Nice, it will be blazing fast having the PI act as a GPU.
Do you also have a function where the PI can take the 6502 off the bus and quickly rewrite the 32K segment used by the 6502?
I did something like that with a Teensy4 and had it keep zero page and stack intact during the swap as kind of a link between program changes.
It worked well, and I have a similar gig going with my synth OS (bank swap without affecting ZP), but all with logic.

With the 2040, are you using times assembly to do the VGA, or does it have enough bang with timers and DMA?
I will have to dig out my 2040 now that I know you can simply program it with the Duino IDE... didn't know that!

Cheers,
Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 30, 2024 2:52 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 962
Location: Potsdam, DE
The Pi will provide an initial program load (when it works - I've got a spaghetti dish of logic analyzer wires on it at the moment) and the memory will cover all 64k except for a few IO areas in the top page. It can't see the memory directly but it _could_ jump through some hoops and read at least some of it. When it's loading, it's forcing a sequence of LDA #xx, STA yyyy instructions and only allowing the processor to drive the bus during that write phase. To read ram, it would have to do the same in reverse; I haven't thought that through though.

It's got enough speed with the timers and DMAs and the PIOs. Have a look for Hunter Adams for the basic code; I found some other code modifying it by San Tarcisio to reduce the resolution and increase the colour depth, but working on Arduino - but I've removed most of his modifications, installed a larger font, written an interface to read and decode ps/2, and so on. I can post my codebase - there's a lot of it and it's very messy at the moment as I play with stuff, but if you want to see it, I'll zip it up and post it.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 30, 2024 3:00 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 962
Location: Potsdam, DE
This thread for parallel information: viewtopic.php?f=1&t=8112

Neil


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 30 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: