Author Topic: Replicating a 'custom' 6800 in FPGA  (Read 6304 times)

0 Members and 1 Guest are viewing this topic.

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1689
  • Country: dk
Re: Replicating a 'custom' 6800 in FPGA
« Reply #75 on: September 28, 2021, 04:12:39 pm »
I just assembled the source code with as11 , no issue at all.

https://github.com/JimInCA/motorola-6800-assembler

Code: [Select]
./as11 S00060G.asm -l >S00060G-11.lst


If you are "lucky" (HC11 ressources) you might be able to use the HC11 as Timer and PIA

Nice HC11 site
http://www.hc11.demon.nl/thrsim11/68hc11/


« Last Edit: September 28, 2021, 05:39:41 pm by bingo600 »
 

Offline metertech58761

  • Contributor
  • Posts: 40
  • Country: us
Re: Replicating a 'custom' 6800 in FPGA
« Reply #76 on: September 29, 2021, 04:30:56 am »
Really?! That version compiled with no hiccups?! Cool! (considering I did NOT use a standard assembler to make that version)

That would be awesome if I could combine the PIA and PTM into the HC11...
All three timers in the PTM are used (one is used as an internal programmable delay, the second drives the _NMI line, and the third is XOR'd with the outgoing data stream).

I know of a board that was part of this system that probably did just that, but I have not been able to track down the particulars of the HC11 that was used in that role.
I'm guessing it too was a custom variant (it was a 68-pin PLCC whereas pretty much all the remaining HC11s available are 52-pin PLCC).

Anyway, I want to see if I understand correctly how to connect the HC11 in 'expanded' mode - here's a schematic I worked out for an "adapter".
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1689
  • Country: dk
Re: Replicating a 'custom' 6800 in FPGA
« Reply #77 on: September 29, 2021, 05:23:36 am »
Remember ... That it assembles the source , doesn't mean it will work w. the HC11 internal timers etc.
You would need to "decode" the timer & PIA usage , and replicate that w. HC11 "internals"
I even think it created a 100% equal .bin file  HC11 vs "Original bin"

This one might come in handy to understand the Timer ... The DS is a bit cryptic i think.
http://www.bitsavers.org/components/motorola/_dataSheets/MC6840UM.pdf

I'm not an EE , just a hobby'ist.
The electrical design should be reviwed by someone else.

Good info
https://mil.ufl.edu/3744/software_hc11.html


HW Inspiration
https://inworks.ucdenver.edu/jkb/legorobots/hardware.html


Mux'ed
https://www.kswichit.com/C11evb/C11evb.htm


https://hackaday.io/project/171451-68hc11-cpu-board-for-rc2014
https://cdn.hackaday.io/files/1714517335359584/68hc11.pdf

Non mux'ed
https://www.cs.uml.edu/~fredm/handyboard.com/oldhb/schemv12/hbsch12.pdf
https://mil.ufl.edu/3744/docs/11EVBU-SCH-D.pdf




Edit: You do know the HC573 is a 373 with a much nicer pin layout

/Bingo

« Last Edit: September 29, 2021, 05:48:24 am by bingo600 »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 9153
  • Country: fr
Re: Replicating a 'custom' 6800 in FPGA
« Reply #78 on: September 29, 2021, 05:23:58 pm »
Remember ... That it assembles the source , doesn't mean it will work w. the HC11 internal timers etc.

Quite right of course. And with that said, although the CPU the OP is trying to replace supports the 6801 instruction set, nothing tells us that it acts as one either - be it for cycle-accuracy, interrupts, and so on...
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1689
  • Country: dk
Re: Replicating a 'custom' 6800 in FPGA
« Reply #79 on: September 29, 2021, 08:20:26 pm »
If clocked by 1MHz as the 01' , and given that the Binaries were "equal" i'd expect the normal instructions to execute 1:1
IRQ could push a bit more or less , but that's prob. not an issue.


/Bingo
 

Offline metertech58761

  • Contributor
  • Posts: 40
  • Country: us
Re: Replicating a 'custom' 6800 in FPGA
« Reply #80 on: October 03, 2021, 11:39:07 am »
Regarding 'just because it compiles doesn't mean it will work', it turns out you are correct...

I had the opportunity to look through the source code I'm making and found one opcode I forgot to change. :)

Also, going back and taking a closer look at the main loop to better understand how it works actually revealed that one section of 15 bytes was accidentally repeated by whoever originally assembled this code (but, given the inefficiency of parts of the code I've since cleaned up, not terribly surprising).

Going back to post 76, I was hoping to verify that I understood how the R/W line is supposed to be derived when using the HC11, or if I am supposed to use the STRB/RW line directly.
 

Offline metertech58761

  • Contributor
  • Posts: 40
  • Country: us
Re: Replicating a 'custom' 6800 in FPGA
« Reply #81 on: October 27, 2021, 02:03:07 am »
Just a quick postscript before I start a couple new threads elsewhere.

In the end, I chose to use a 68HC11F1 (the 68-pin PLCC version).

For one, it has on-board RAM, which allows me to consolidate the two RAM ranges and eliminate the MC6810 and HM-6561 SRAMs once and for all.

The other is that it has the 6801 opcode set, so changes to the firmware should be limited to just relocating the upper RAM and I/O ranges.
 
The following users thanked this post: bingo600


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf