6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 12:56 pm

All times are UTC




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Thu Jun 09, 2022 11:51 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
So this totally opens up a whole new gameplan!!!!

I can write a new program to the Flash ROM at the other bank locations, and then manually switch the bank, then GO to the program (via the Java Monitor).

The program should copy itself to RAM, then run itself.

(The program can even reprogram the Flash ROM, to replace the startup boot code and the USB interface handler. However to do this I need to study and understand how to work the FTDI chip. I have zero idea how to do this, will probably check the data sheet and then turn on the oscilloscope.)

I am thinking to try to do a new interface using the PIA and then connect to my laptop using a UART dongle, then do the FTDI USB later. This SXB board comes with a PIA and two VIAs. Using the PIA can save the other VIAs for other usage (really, just save the exposed VIA port, because the VIA TIDE is used internally, including for this bank switching).

To write to the EPROM, I think I will just brute force it by creating a new program to be run at Bank 0, and then literally copy and paste $FF and the Bank 3 WDC boot program (which probably the Java monitor requires) at the correct location for the huge Flash ROM.

The ROM file seems to just be a straight raw binary, with no encoding. I can even read it via Sublime text editor. So hopefully I can just cut and paste text to make a new binary file to overwrite the EPROM.

(I bought a few extra PLCC of the Flash ROM to experiment with. You can see I labeled the EPROM with "70" which means 70ns, the default that comes with the SXB. You can also buy a 55ns version.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 10, 2022 12:42 am 
Offline
User avatar

Joined: Sun Nov 07, 2021 4:11 pm
Posts: 101
Location: Toronto, Canada
Very nice! It's always so satisfying when you figure these things out and they start working :-)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 10, 2022 4:10 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
CountChocula wrote:
Very nice! It's always so satisfying when you figure these things out and they start working :-)


haha yeah. I just consider it like a real-life RPG.

Not THAT kind of LARPING though. No wielding fake swords and wearing DIY chainmail.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 6:50 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
Confirmation of banks changed.

Banks 0 through 3.


Attachments:
00.jpg
00.jpg [ 2.91 MiB | Viewed 1276 times ]
c0.jpg
c0.jpg [ 1.52 MiB | Viewed 1276 times ]
0c.jpg
0c.jpg [ 1.5 MiB | Viewed 1276 times ]
cc.jpg
cc.jpg [ 1.66 MiB | Viewed 1276 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 10:15 am 
Offline
User avatar

Joined: Sun Nov 07, 2021 4:11 pm
Posts: 101
Location: Toronto, Canada
Very interesting… were able to take a look at what the interrupt vectors look like in the other banks? I'm really curious to see what happens if you get an interrupt when you're in anything but bank 0…


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 7:48 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
CountChocula wrote:
Very interesting… were able to take a look at what the interrupt vectors look like in the other banks? I'm really curious to see what happens if you get an interrupt when you're in anything but bank 0…


Looks like there are no provisions for anything if you swap the banks away from Bank 3. (Bank 3 is the default startup one, at the highest ROM address level).

All 0, 1, and 2 just $FF default blank.


Attachments:
vectors.jpg
vectors.jpg [ 1.69 MiB | Viewed 1255 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 7:51 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
There is a "S19 Load" command. Not really sure how to utilize it. Looks like it can load ROM image files.

https://en.wikipedia.org/wiki/SREC_(file_format)

"This file format may also be known as SRECORD, SREC, S19, S28, S37. "


Attachments:
IMG_6906.jpg
IMG_6906.jpg [ 1.9 MiB | Viewed 1255 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 7:53 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
S19 Format

This is in contrast to the Intel Hex format described by Garth

http://wilsonminesco.com/16bitMathTables/IntelHex.html


Attachments:
Motorola_SREC_Chart.png
Motorola_SREC_Chart.png [ 1.52 MiB | Viewed 1254 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 7:55 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
The monitor tool I have been using was developed by Andrew Jacobs.

Hopefully he will have time to chime in and help out! Haha!

https://github.com/andrew-jacobs

https://github.com/andrew-jacobs/w65c02sxb-monitor


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 7:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Unfortunately, Andrew is no longer with us:
Andrew Jacobs (BitWise) has passed away
but it's great that his work lives on.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 11, 2022 8:03 pm 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
BigEd wrote:
Unfortunately, Andrew is no longer with us:
Andrew Jacobs (BitWise) has passed away
but it's great that his work lives on.


Terrible news.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 15, 2022 8:09 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
Vision for this project;

Have an onboard monitor with assembler, accessible via USB to a computer running a serial terminal program (ideally CoolRetroTerm haha)

Next steps;

A) Choose a monitor (I think I will go with SYSMON65)

https://github.com/jdimeglio/SYSMON65

I believe Joe Dimeglio is active on this forum (who isn't from the 6502 world!)


b) Figure out how to use the FTDI USB interface to handle serial connectivity to a computer.

(Datasheet attached)


Attachments:
FTDI DS_FT245R.pdf [1.15 MiB]
Downloaded 50 times
Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 15, 2022 8:11 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
The FTDI FT245RL is connected to one of the 65c22 VIAs.

I'm not sure what kind of code is available to handle the activity between these two chips, and the expected serial handshaking and data exchanges.


Attachments:
Screen Shot 2022-06-14 at 10.12.16 PM.png
Screen Shot 2022-06-14 at 10.12.16 PM.png [ 233.24 KiB | Viewed 1214 times ]
Screen Shot 2022-06-14 at 10.10.55 PM.png
Screen Shot 2022-06-14 at 10.10.55 PM.png [ 212.9 KiB | Viewed 1214 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 16, 2022 4:04 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
I've searched this forum for "FT245RL" and found a bunch of posts that I don't understand.

But this webpage gives some basic hint how the FTDI chips work:

https://www.ecstaticlyrics.com/electronics/USB/FT240X/

This describes the FT240X but might be similar enough to the 245R that some info can be gleaned about how to control the data stream.

Quote:
Power is applied to (or received from, if USB-powered) the top left pin (positive) and the bottom-right pin (ground). The eight pins on the bottom are the data bus, delightfully sorted into numerical order unlike the chip itself. At the top right, the sequence FTRWR represents these signals, all of which are active-low.

F: The "SIWU#" pin, which flushes data in the FIFO to the PC immediately.
T: The "TXE#" pin, which indicates when data may be written to the FIFO.
R: The "RXE#" pin, which indicates when data is available to be read from the FIFO.
W: The "WR#" pin, which writes data into the FIFO to be sent to the PC.
R: The "RD#" pin, which reads data from the FIFO which came from the PC.
The other pins labeled 5 & 6 are the "CBUS5" and "CBUS6" pins, the exact function of which is configurable via USB using a utility from FTDI, but by default you can simply ignore them. The SIWU# pin (the one labeled "F") may also be ignored if you don't care to utilize it.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 16, 2022 8:24 am 
Offline

Joined: Wed Feb 17, 2021 6:54 am
Posts: 69
Bought this to experiment with.

Jumper selectable 3.3 or 5v.


Attachments:
IMG_7028.jpg
IMG_7028.jpg [ 1.7 MiB | Viewed 1174 times ]
IMG_7027.jpg
IMG_7027.jpg [ 1.55 MiB | Viewed 1174 times ]
IMG_7026.jpg
IMG_7026.jpg [ 2.23 MiB | Viewed 1174 times ]
IMG_7029.jpg
IMG_7029.jpg [ 1.49 MiB | Viewed 1174 times ]
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  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 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: