Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
fordp
Posts: 973
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by fordp » Sat Apr 08, 2017 2:43 pm

hoglet wrote:
fordp wrote: Does the circle project not support it?
This? https://github.com/rsta2/circle

Doesn't seem to :(
I suggest we wait for them to get it working first ;)
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
myelin
Posts: 531
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by myelin » Tue Apr 11, 2017 10:26 pm

What I'm working on right now (will post pics once I have it a bit more wired up) -- an Electron cartridge that uses an XC9572XL CPLD to do the address decoding and level shifting to let PiTubeDirect run in a Plus 1 socket. I have the schematic and VHDL more or less done, and am testing it out using one of PaulB's breakout cartridges, an XC9572XL eval board, and a Pi Zero. Will report back once I've had a chance to try it out!
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
KenLowe
Posts: 452
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by KenLowe » Thu Apr 13, 2017 9:13 pm

sundbyk wrote: I loaded the old release from October and that works fine.
How did you get that to work on the zero w? I've just tried to copy the October release Rasp Pi Zero kernel.img file over to a newly formatted FAT32 SD card and it just causes the computer to hang on boot. I've also tried copying the cmdline.txt & config.txt files over from the BOA release, and renaming the October release kernel.img file to kernelpizero.img, but it also just hangs.I'm not sure if I'm doing things right here!

User avatar
hoglet
Posts: 7809
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Thu Apr 13, 2017 9:29 pm

Ken,

At the moment, none of the developers has access to a Pi Zero W.

I can't guarantee this will work, but please try the following:
- start with a blank SD card, formatted as FAT32
- Unzip the Boa release from here
- Replace the files: bootcode.bin, fixup_cd.dat and start_cd.elf with the latest versions from here

Let us know how you get on.

Dave

User avatar
KenLowe
Posts: 452
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by KenLowe » Thu Apr 13, 2017 10:01 pm

Dave,

Getting the same results as the standard BOA release. Works ok on the Zero, but doesn't work on the Zero W.
With the Zero W, the computer boots up ok, but it just doesn't recognise any Tube device.

Happy to let you borrow the Zero W for testing / developing if that would help you.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sat Apr 15, 2017 12:24 pm

For pizero W testers could you try daves suggestions :

Code: Select all

- start with a blank SD card, formatted as FAT32
- Unzip the Boa release from here :
- Replace the files: bootcode.bin, fixup_cd.dat and start_cd.elf with the latest versions from here
Plus the attached file please rename to config.txt and put on the sdcard.
Attachments
configpi0w.txt
(591 Bytes) Downloaded 22 times

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sat Apr 15, 2017 2:16 pm

@trixster

On the cobra dev branch I've just improved the Tube ULA host read data setup by 25nS. Could you possibly have a try and let me know how you get on ?

User avatar
KenLowe
Posts: 452
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by KenLowe » Sat Apr 15, 2017 11:12 pm

dp11 wrote:For pizero W testers could you try daves suggestions :

Code: Select all

- start with a blank SD card, formatted as FAT32
- Unzip the Boa release from here :
- Replace the files: bootcode.bin, fixup_cd.dat and start_cd.elf with the latest versions from here
Plus the attached file please rename to config.txt and put on the sdcard.
So, I can confirm that the above instructions work! Co-pro is now working on my Pi Zero W.

Had to replace my 6502 processor along the way, but that's another story :roll:

Thank you.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sat Apr 15, 2017 11:41 pm

Excellent. Would you mind running a few more tests for me. I'll sort out exactly what. But I suspect it will be about 6 tests.

User avatar
hoglet
Posts: 7809
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Sun Apr 16, 2017 6:31 am

Dominic, are you thinking there is a new property filter for the Pi Zero W (e.g. [pi0w])?

It is a shame the can't even properly document a property file!

User avatar
KenLowe
Posts: 452
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by KenLowe » Sun Apr 16, 2017 7:24 am

dp11 wrote:Excellent. Would you mind running a few more tests for me. I'll sort out exactly what. But I suspect it will be about 6 tests.
More than happy to help, but I won't be around much today. However, I should have some time later this evening.
hoglet wrote:Dominic, are you thinking there is a new property filter for the Pi Zero W (e.g. [pi0w])?
Yes, having compared the two files, I was wondering that as well.

Edit:
So, adding a [pi0w] section into the file didn't seem to have any effect:

Code: Select all

# Settings for Pi Zero Wifi
[pi0w]
arm_freq=1000
core_freq=400
kernel=kernelrpizero.img
# Debug kernel (needs a 115200 serial connection)
#kernel=debug/kernelrpizero.img
However, adding the Pi Zero kernel to the [pi1] section does seem to work:

Code: Select all

# Settings for Pi 1 Model B and B+ & Pi Zero WiFi
# Use kernelrpi.img for Pi 1 Model B Rev 1.0
# Use kernelrpibplus.img for all other Pi 1 models (inc B+)
# Use kernelrpizero.img for Pi Zero WiFi
[pi1]
arm_freq=700
core_freq=350
kernel=kernelrpizero.img
#kernel=kernelrpi.img
#kernel=kernelrpibplus.img
# Debug kernel (needs a 115200 serial connection)
#kernel=debug/kernelrpizero.img
#kernel=debug/kernelrpi.img
#kernel=debug/kernelrpibplus.img
Hope this is of some help.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sun Apr 16, 2017 11:35 am

I had a quick look at bootloader.bin yesterday which started me down this track yesterday. As you say there is no pi0w property. This is almost certainly a bug . I'd like the results from a few more tests before reporting it.

User avatar
trixster
Posts: 735
Joined: Wed May 06, 2015 11:45 am
Location: York
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by trixster » Sun Apr 16, 2017 12:40 pm

dp11 wrote:@trixster

On the cobra dev branch I've just improved the Tube ULA host read data setup by 25nS. Could you possibly have a try and let me know how you get on ?
I certainly will but I'm not back from holiday until next Tuesday!
A3020 | A3000 | A420/1 | BBC B 128K RAM/ROM 20K Shadow Pi0 VideoNuLA
Master Turbo DC BeebSID | Atom | A4000 060 | A3000 060 | A1200 060 | A500
Atari Falcon 060 | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar | X68000

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sun Apr 16, 2017 5:11 pm

@KenLowe

You have the basic idea. I'd like to know if any of the other filters work for the Pi0W. Also could you remove the frequency settings and see what frequency the bootcode.bin selects. You can do this by starting the Tube and doing :

Code: Select all

 old list 1,3
One last test. On the full boa release can you just try the configpi0w.txt ( renamed to config.txt)

User avatar
KenLowe
Posts: 452
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by KenLowe » Sun Apr 16, 2017 6:46 pm

Right, I've run a few tests, and the results are noted below. Each test is with a clean config.txt from boa release and latest versions of bootcode.bin, fixup_cd.dat and start_cd.elf:

Code: Select all

Test 1: Add kernel=kernelrpizero.img to [pi2] & comment out kernel=kernelrpi2.img
Result: Kernel not loaded. BBC does not recognise Tube

Test 2: Add kernel=kernelrpizero.img to [pi3] & comment out kernel=kernelrpi3.img
Result: Kernel not loaded. BBC does not recognise Tube

Test 3: Add kernel=kernelrpizero.img to [pi1] & comment out kernel=kernelrpi.img
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/350

Test 4: Add kernel=kernelrpizero.img to [pi1] & comment out kernel=kernelrpi.img & frequencies
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 1000/400
And interestingly...

Code: Select all

Test 5: Remove comment from kernel=kernelrpblus.img in [pi1] section & comment out kernel=kernelrpi.img
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/350

Test 6: Remove comment from kernel=kernelrpblus.img in [pi1] section & comment out kernel=kernelrpi.img & frequencies
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 1000/400
Re-ran tests 3 thru 6 with bootcode.bin, fixup_cd.dat and start_cd.elf from the boa release and got the following results. Tests 3a & 5a give the same results as 3 & 5 above. However, tests 4a & 6a give different frequencies compared to tests 4 & 6 above:

Code: Select all

Test 3a: Add kernel=kernelrpizero.img to [pi1] & comment out kernel=kernelrpi.img
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/350

Test 4a: Add kernel=kernelrpizero.img to [pi1] & comment out kernel=kernelrpi.img & frequencies
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/250

Test 5a: Remove comment from kernel=kernelrpblus.img in [pi1] section & comment out kernel=kernelrpi.img
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/350

Test 6a: Remove comment from kernel=kernelrpblus.img in [pi1] section & comment out kernel=kernelrpi.img & frequencies
Result: Kernel loaded. BBC recognises Tube present and reports frequencies as 700/250
Let me know if you want any further tests.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sun Apr 16, 2017 10:37 pm

Excellent work. Let me have a think about the right long term way of solving this.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Mon Apr 17, 2017 9:35 pm

@trixter I've backed the changes as they broke other machines.
@KenLowe I've changed the cobradev branch based on your work so pi zero W should work out of the box. The only optional change zero W users might like to do is increase the arm frequency to 1000MHz from 700MHz in config.txt

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Fri Apr 21, 2017 7:55 pm

@trixster : I've just pushed a change to the cobra-dev branch. This adds a new parameter in cmdline.txt. This delays the timing. If your issue is what I think it is then adjusting this parameter between 0 and 40 you should be able to find a value that works for you. I'm guessing something like 3 or 4 will work all the the way to 10 or more.

I've reported the PIzero W bootloader issue and the pi team have fixed it. In Cobra-dev I have a workaround. I don't really want to switch to the new bootloader.bin as that slows down booting.

User avatar
myelin
Posts: 531
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by myelin » Fri Apr 21, 2017 11:02 pm

Just got work permission to open source all my designs :D

Here's the Electron cartridge for PiTubeDirect:

https://github.com/google/myelin-acorn- ... be_direct/
elk_pi_tube_direct 3D.png
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
hoglet
Posts: 7809
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Sat Apr 22, 2017 6:18 am

myelin wrote:Just got work permission to open source all my designs :D

Here's the Electron cartridge for PiTubeDirect:
Nice!

I've just looked over your CPLD, and it seems some temporary debug code might have been left in:

Code: Select all

    -- DEBUG: leds (0 = on)
    tube_D(5) <= not counter(3); -- LED5
    tube_A0 <= not counter(2); -- LED4
    tube_nTUBE <= not counter(1); -- LED3
    tube_RnW <= not counter(0); -- LED2
Regarding your counter skipping over counts, I can think of a couple of things:
- it would be better to use the falling edge of Phi0 (but in your case you should get away with the rising edge, as you are not using the write data)
- some 6502 instructions (the read-modify-write ones like INC and DEC) actually generate two write cycles

Dave

User avatar
BigEd
Posts: 2319
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by BigEd » Sat Apr 22, 2017 6:34 am

hoglet wrote: - some 6502 instructions (the read-modify-write ones like INC and DEC) actually generate two write cycles
Goodness, so they do!

User avatar
hoglet
Posts: 7809
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Sat Apr 22, 2017 6:36 am

BigEd wrote:
hoglet wrote: - some 6502 instructions (the read-modify-write ones like INC and DEC) actually generate two write cycles
Goodness, so they do!
Yes, and it was actually you that told me this :lol:
http://forum.6502.org/viewtopic.php?f=1&t=3117#p35640

User avatar
BigEd
Posts: 2319
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by BigEd » Sat Apr 22, 2017 8:04 am

Oh no!!!

User avatar
myelin
Posts: 531
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by myelin » Sun Apr 23, 2017 11:02 pm

hoglet wrote:I've just looked over your CPLD, and it seems some temporary debug code might have been left in:

Code: Select all

    -- DEBUG: leds (0 = on)
    tube_D(5) <= not counter(3); -- LED5
    tube_A0 <= not counter(2); -- LED4
    tube_nTUBE <= not counter(1); -- LED3
    tube_RnW <= not counter(0); -- LED2
Regarding your counter skipping over counts, I can think of a couple of things:
- it would be better to use the falling edge of Phi0 (but in your case you should get away with the rising edge, as you are not using the write data)
- some 6502 instructions (the read-modify-write ones like INC and DEC) actually generate two write cycles
Indeed so... you're looking at the test code I used to try to get an XC9572XL dev board to talk to my Electron using one of PaulB's breakout boards. A big mess of hookup wires everywhere, which I'm pretty sure is to blame for the skipped counts. I believe I tried switching it to use the falling edge (when the data bus will have a valid value on a write), and it got even worse, at which point I decided to just wait for the PCBs to come back from the fab :)

One other possibility: I wrote my test program in BASIC, writing to the debug register with ?&FCF0=0. I wonder if BASIC could possibly have been writing to my register multiple times. My Plus 1 is unhappy right now, unfortunately, but once I get that up and running again, I'll give it another try from assembly code.
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
simoni
Posts: 443
Joined: Wed May 25, 2016 6:18 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by simoni » Tue Apr 25, 2017 4:21 am

At the moment, none of the developers has access to a Pi Zero W.
Why not set-up/publish a paypal donation button or email address? I would gladly send you some money towards some Pi Zero W boards. Also anyone else wanting to help with the "why doesn't it work properly on my XYZ board?" questions should be willing to help too.

Open-source doesn't mean "free to develop" - test boards, level converters and cabling cost money :)

Just a thought!

User avatar
fordp
Posts: 973
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by fordp » Sat May 13, 2017 9:42 pm

myelin wrote:Just got work permission to open source all my designs :D

Here's the Electron cartridge for PiTubeDirect:

https://github.com/google/myelin-acorn- ... be_direct/

elk_pi_tube_direct 3D.png
Maybe stop the ground plane at the Pi connector level as the Pi Zero W version wireless will work better if we ever get some code in there for Wifi / Bluetooth.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
myelin
Posts: 531
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by myelin » Fri May 19, 2017 3:45 am

hoglet wrote:Regarding your counter skipping over counts, I can think of a couple of things:
- it would be better to use the falling edge of Phi0 (but in your case you should get away with the rising edge, as you are not using the write data)
- some 6502 instructions (the read-modify-write ones like INC and DEC) actually generate two write cycles
My PCBs finally arrived, and I tried again without the big mess of wires, and the counter works perfectly, so I guess it was a physical rather than a logical issue :)

Now I'm trying to actually get PiTubeDirect working, using my board and a Pi Zero. I didn't have any luck with the Boa release (it booted fine on the Pi, but the Electron just booted up normally - no tube banner, PAGE=E00, HIMEM=6000), so I've rebuilt from the current git master branch and enabled DEBUG_TUBE. Now I get the following when I hit BREAK or CTRL-BREAK:

Code: Select all

tube_index = 24
Wr R1 = 0a
Wr R1 = 41
Wr R1 = 63
Wr R1 = 6f
Wr R1 = 72
Wr R1 = 6e
Wr R1 = 20
Wr R1 = 54
Wr R1 = 55
Wr R1 = 42
Wr R1 = 45
Wr R1 = 20
Wr R1 = 36
Wr R1 = 35
Wr R1 = 30
Wr R1 = 32
Wr R1 = 20
Wr R1 = 36
Wr R1 = 34
Wr R1 = 4b
Wr R1 = 0a
Wr R1 = 0a
Wr R1 = 0d
Wr R1 = 00
             cycle counter = 13282107776
              I_CACHE_MISS = 503370606
              D_CACHE_MISS = 65553
tube reset - copro 0
Any ideas? Here's the VHDL I'm using, with the leftover debug stuff cleared up. It's connected to a "Minus One" board, because my Plus One isn't working right now. VHDL for that is here.

Here's what I get from the Pi on startup:

Code: Select all

    FIRMWARE_VERSION : 573f5f3d 
         BOARD_MODEL : 00000000 
      BOARD_REVISION : 00900092 
   BOARD_MAC_ADDRESS : 01eb27b8 6361106f 
        BOARD_SERIAL : 0e016f10 00000000 
           EMMC_FREQ :    250.000 MHz    250.000 MHz    250.000 MHz
           UART_FREQ :      3.000 MHz   1000.000 MHz   1000.000 MHz
            ARM_FREQ :   1000.000 MHz   1000.000 MHz   1000.000 MHz
           CORE_FREQ :    400.000 MHz    400.000 MHz    400.000 MHz
            V3D_FREQ :    300.000 MHz    300.000 MHz    300.000 MHz
           H264_FREQ :    300.000 MHz    300.000 MHz    300.000 MHz
            ISP_FREQ :    300.000 MHz    300.000 MHz    300.000 MHz
          SDRAM_FREQ :    450.000 MHz    450.000 MHz    450.000 MHz
          PIXEL_FREQ :      0.000 MHz  -1894.967 MHz  -1894.967 MHz
            PWM_FREQ :      0.000 MHz    500.000 MHz    500.000 MHz
           CORE TEMP :  37.93 ?°C
        CORE VOLTAGE :   1.35 V
     SDRAM_C VOLTAGE :   1.20 V
     SDRAM_P VOLTAGE :   1.20 V
     SDRAM_I VOLTAGE :   1.20 V
            CMD_LINE : dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x900092 bcm2708.serial=0xe016f10 smsc95xx.macaddr=B8:27:EB:01:6F:10 bcm2708_fb.fbswap=1 bcm2708.uart_clock=3000000 bcm2708.d0
               COPRO : 0
0 0000000000 1100000000
1 0001220000 0001220011
2 4400000011 4400111111
A0 = GPIO27 = mask 08000000
A1 = GPIO02 = mask 00000004
A2 = GPIO03 = mask 00000008
emulator speed 3
Staring VC ULA
VidCore code = 01f613b4
VidCore   r0 = 7e0000a0
VidCore   r1 = 01f013e0
VidCore   r2 = 00000000
VidCore   r3 = 0003021b
VidCore   r4 = 00000000
VidCore   r5 = 00200000
Done
enable_MMU_and_IDCaches
cpsr    = 600001d3
auxctrl = 00000047
ttbcr   = 00000000
ttbr0   = 01f90003
sctrl   = 0005187d
ctype   = 1d152152
benchmarking core....
             cycle counter = 6000256
              I_CACHE_MISS = 3
              D_CACHE_MISS = 1
benchmarking io toggling....
             cycle counter = 17000256
              I_CACHE_MISS = 4
              D_CACHE_MISS = 2
benchmarking 1KB memory copy....
             cycle counter = 9984
              I_CACHE_MISS = 8
              D_CACHE_MISS = 283
benchmarking 2KB memory copy....
             cycle counter = 11712
              I_CACHE_MISS = 0
              D_CACHE_MISS = 538
benchmarking 4KB memory copy....
             cycle counter = 23744
              I_CACHE_MISS = 0
              D_CACHE_MISS = 1082
benchmarking 8KB memory copy....
             cycle counter = 47424
              I_CACHE_MISS = 0
              D_CACHE_MISS = 2171
benchmarking 16KB memory copy....
             cycle counter = 95744
              I_CACHE_MISS = 0
              D_CACHE_MISS = 4351
benchmarking 32KB memory copy....
             cycle counter = 191360
              I_CACHE_MISS = 0
              D_CACHE_MISS = 8809
benchmarking 64KB memory copy....
             cycle counter = 391552
              I_CACHE_MISS = 0
              D_CACHE_MISS = 18268
benchmarking 128KB memory copy....
             cycle counter = 799424
              I_CACHE_MISS = 0
              D_CACHE_MISS = 36861
benchmarking 256KB memory copy....
             cycle counter = 1666048
              I_CACHE_MISS = 0
              D_CACHE_MISS = 73725
benchmarking 512KB memory copy....
             cycle counter = 5002368
              I_CACHE_MISS = 0
              D_CACHE_MISS = 147459
benchmarking 1024KB memory copy....
             cycle counter = 10005120
              I_CACHE_MISS = 0
              D_CACHE_MISS = 294909
Raspberry Pi Direct 0 65C02 (65tube) Client
Update: I can read out the "Acorn TUBE 6502 64K" startup message with: REPEAT : A% = ?&FCE1 : PRINT CHR$(A%); : UNTIL A% = 0

So I do appear to have access to the Tube registers, but the OS isn't talking to it. Do I need a Tube host ROM? This is running on an otherwise unexpanded Electron, so the only ROMs present are BASIC and the MOS (i.e. it doesn't even have the Plus 1 ROM).
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

dp11
Posts: 870
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Fri May 19, 2017 4:46 am

Yes you do need some tube host code as the mos doesn't have it. On the beeb this was in dfs1. 2.

User avatar
danielj
Posts: 6779
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by danielj » Fri May 19, 2017 5:18 am

It's in the AP6 rom not sure where else it's been secreted for the elk!

d.

User avatar
myelin
Posts: 531
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by myelin » Fri May 19, 2017 5:37 am

danielj wrote:It's in the AP6 rom not sure where else it's been secreted for the elk!
Thanks! That clears things up nicely. Pity I don't have any more sockets that I can solder on to my "Minus One" board; I could just write the AP6 rom into a flash cart and get this working that way. I wonder if it's possible to run the Tube host code out of RAM.

http://mdfs.net/Software/Tube/BBC/Host.src looks like what I need. Most of what it does is copy two chunks of code into &0016-&0057 and &0400-&06FF, which would be easy enough to do, but it looks like it needs to implement service entries FE and FF, probably during the boot process, which I'm not sure I can do without something in the sideways address space, so I might just need to wait until I get some more sockets for my PCB.
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

Post Reply