W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

For discussing the 65xx hardware itself or electronics projects.
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

BigEd wrote:
Jmstein7 wrote:
... but then I read 265iromlist (cleaned up by Andrew Jacobs), which gives the code for the internal rom...
Do you have a link for this clean version? I did a quick search but it was inconclusive. Thanks!
Here you go: download/file.php?id=7788
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by BigEd »

Thanks!
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

BigEd wrote:
Thanks!
No problem! Hope all is well with you - it's been a while!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by BigEd »

Ha ha - all well thanks - holiday/vacation, friends, family, walking...
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

BigEd wrote:
Ha ha - all well thanks - holiday/vacation, friends, family, walking...
Okay, I've got it running at FCLK 6mhz with Port 3 at 115200 at boot. I'm still using the external clock for Timer 4. For some reason, I can't get FCLK over 6mhz. I just get garbage if I try.

Jonathan
tokafondo
Posts: 344
Joined: 11 Apr 2020

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by tokafondo »

Jmstein7 wrote:
Okay, I've got it running at FCLK 6mhz with Port 3 at 115200 at boot. I'm still using the external clock for Timer 4. For some reason, I can't get FCLK over 6mhz. I just get garbage if I try.

Jonathan
I don't know how you managed to get Port 3 to run at 115200 at boot.

The ROM monitor listing has calculations for FCLK =< 6.144 Mhz, and bps =<57600.

Page 30 of the w65c265 datasheet v2.1 has the formula to get the values to program the timers for arbitrary FCLK and bps.
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

tokafondo wrote:

I don't know how you managed to get Port 3 to run at 115200 at boot.
Custom ROM.
handyandy
Posts: 113
Joined: 14 Sep 2015
Location: Virginia USA

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by handyandy »

Does your custom rom contain values for calculating FCLK over 6 mhz and corresponding baud rates?
The internal rom will default to 3.68 mhz on error.
BTW congrats!

Cheers, Andy
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

handyandy wrote:
Does your custom rom contain values for calculating FCLK over 6 mhz and corresponding baud rates?
The internal rom will default to 3.68 mhz on error.
BTW congrats!

Cheers, Andy
Andy,

Great question! My ROM doesn't need to do that because I made FCLK independent of the baud rate. I use TIN on P60 to connect an oscillator for Timer 4. In my case, 1.8432mhz. That is what it uses to set the baud rate. Therefore, you can use whatever FCLK you desire.

Jonathan
User avatar
Sheep64
In Memoriam
Posts: 311
Joined: 11 Aug 2020
Location: A magnetic field

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Sheep64 »

I presume that you want to re-assemble the W65C265's monitor program but with UART not clashing. I understand that the monitor looks for a magic string at $8000 and then runs an external program. If you're not using the region from $8000-$DEFF, it might be quicker and easier to run a patched copy of the monitor from external ROM. It might also be desirable to use an external UART.
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

Sheep64 wrote:
I presume that you want to re-assemble the W65C265's monitor program but with UART not clashing. I understand that the monitor looks for a magic string at $8000 and then runs an external program. If you're not using the region from $8000-$DEFF, it might be quicker and easier to run a patched copy of the monitor from external ROM. It might also be desirable to use an external UART.
The "magic" bytes are "WDC", and the internal rom searches a few different addresses for that. But, I agree that an external UART is desirable.
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

Okay, here she is!
Image.jpeg
I found two errors, but they were simple to fix with two wires and some solder.

Testing her like crazy!
fachat
Posts: 1124
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by fachat »

I would have hoped for a 65256 chip version that has lots of internal RAM and boots from SPI flash, so all IO pins would be available instead of having to sacrifice them for the system bus
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by Jmstein7 »

fachat wrote:
I would have hoped for a 65256 chip version that has lots of internal RAM and boots from SPI flash, so all IO pins would be available instead of having to sacrifice them for the system bus
I guess that would have made too much sense (?)
tokafondo
Posts: 344
Joined: 11 Apr 2020

Re: W65C265 Multiplexed Pins (PIB and UART3) - Custom Board

Post by tokafondo »

fachat wrote:
I would have hoped for a 65256 chip version that has lots of internal RAM and boots from SPI flash, so all IO pins would be available instead of having to sacrifice them for the system bus
Who knows... maybe some day WDC surprises all of us with a fpga based '265s, so what you say can be achieved.
Post Reply