Image Map Image Map
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44

Thread: 8050

  1. #21
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,274
    Blog Entries
    3

    Default

    Well done!
    Torfinn

  2. #22
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    While refurbishing the drives, ive also been working on my Arduino interface.

    Basically, it seemed unnecessary to have GPIB buffer chips when the Arduino I/O can sit directly on the bus. I just received the PCB from JCLPCB (took two weeks on the cheap delivery but they seem well made and above all, the price was great)

    Anyway, the Mega2560 I/O connects directly to the bus lines. When I want to pull a line low, I change the pin mode to output (having already set the output condition as LOW) then when I want to release the line to go high, I set the pin mode to input and let the PET drive the line high. I cant see a problem with that as the Arduino can easily sink the current necessary to pull the line low, even if there are more devices on the line (which, actually should reduce the load when pulling a line down)

    I have also used a SD card interface connected via the SPI lines, which works perfectly with the byte at a time operation of the bus.

    The program at present works for LOAD and SAVE commands to device 8. I need to work out how to make the LOAD"$",8 directory command work. Not sure if to make a file with the name $ then the load command works perfectly, but I would then have to update the $ file every time I added a file, or write a bit of code to detect the $ then do a DIR of the SD card, and build the file in right format to send.

    The Mega2560 works perfectly as it works at 5v rather than 3.3v so no problems there, the one odd thing, Commodore managed to make a system with 12 character file names, where as the SD card with FAT32 can only take a 8.3 file name

    The PCB has the GPIB connector a little to close to the edge of the board so there is a risk of touching the power connector, needs moving back a tad.
    Should have put a hole for a LED to indicate read & write

    Lots more to do, but it only cost about 25 in parts.

    https://github.com/Gary-Clark/CBM-PET-IEEE

  3. #23
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    The next thing I need to work out is, how are machine language programs saved?

    I can load basic programs from my tape emulator and save them over the GPIB, but while the book 'PET and the IEEE-488 bus' describes the operation of save and load (and thus was essential to debugging the interface) it doesn't go into how a machine language program is saved. I know they end up with a single basic command calling the program, but if I load a TAP file, how would I save it to a 8050 ? If I know this I can program the interface to handle it

    Also does anyone have the .TAP tape image specification. I would like to try to convert TAP files to raw files so I can load them.

  4. #24
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    Have attached the Arduino and my 8050 together and they almost play nice. I can load/save to the arduino then load/save to the 8050, however, while I am reading the device number and ignoring it if its not for the arduino (and allowing NDAC to go high Z), I think I then need to ignore every ATN until I get a bus unlisten code, so I need a bit more tinkering to get it to work, but at least its electronically compatible.

  5. #25
    Join Date
    Apr 2009
    Location
    Iowa, USA
    Posts
    109

    Default

    AVR can sit on IEEE bus, but it won't handle multiple drives without the 7516x buffers or similar. Just noting.

  6. #26
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    Quote Originally Posted by brain View Post
    AVR can sit on IEEE bus, but it won't handle multiple drives without the 7516x buffers or similar. Just noting.
    Works fine together with the 8050, I can access the Arduino as device 9 and the 8050 as device 8.

    Cant see why buffers would be needed. The PET sources the current does it not ?, when a external device wants to assert a line low, it sinks the current and the line goes low. If multiple devices pull say NRFD low, the fact that the arduino is on the line would make no difference ?, if it is ready for data, if you set NRFD to an input, it goes high Z and if nothing else is pulling the line low, it goes high.

    What situation would a bufffer be needed ? Cant quite see why.

    Anyway, got it saving and loading programs

    Figured out the way it builds a directory listing and can now perform most of the LOAD"$" command (some tidying up to do with formatting, file size display and the blocks free info)

    Limited to 8 character file names due to the FAT32 limitations and doesn't do sequential file access etc yet.

  7. #27

    Default

    Quote Originally Posted by Gary C View Post
    Works fine together with the 8050, I can access the Arduino as device 9 and the 8050 as device 8.

    Cant see why buffers would be needed. The PET sources the current does it not ?, when a external device wants to assert a line low, it sinks the current and the line goes low. If multiple devices pull say NRFD low, the fact that the arduino is on the line would make no difference ?, if it is ready for data, if you set NRFD to an input, it goes high Z and if nothing else is pulling the line low, it goes high.

    What situation would a bufffer be needed ? Cant quite see why.

    Anyway, got it saving and loading programs

    Figured out the way it builds a directory listing and can now perform most of the LOAD"$" command (some tidying up to do with formatting, file size display and the blocks free info)

    Limited to 8 character file names due to the FAT32 limitations and doesn't do sequential file access etc yet.
    My PET is still far from proper function, but I'd be very interested to see schematics and a sketch of what you've worked out! I have a 4040 in the basement that I'm planning to turn my attention to after this beast is back in working order.

  8. #28
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    The PCB has the GPIB connector a little to close to the edge of the board so there is a risk of touching the USB connector case, needs moving back a tad.
    Should have put a hole for a LED to indicate read & write

    Lots more to do, but it only cost about 25 in parts.

    https://github.com/Gary-Clark/CBM-PET-IEEE

    Current software hasn't been updated, will do tonight.

    but it is very much a work in progress just for my own entertainment. Should also say its saving and loading basic programs. Not sure how it saves a combined machine and basic program

    Last night, I found a source of .PRG programs and looking at them in hex dump, they should work, will try tonight.

  9. #29
    Join Date
    May 2018
    Location
    Lancashire
    Posts
    259

    Default

    Odd

    I have loaded a program called Tanks from a TAP file (and it works) then saved it to the 8050 and the Arduino.

    I can load and run the program by loading from either unit.

    I also have a bunch of PRG files and one is called Tanks, but when I copy it to the SD card and try to load it, it fails.

    Oddly, if I hex dump both files, they look identical, right up until the 00 00 00 data string, which is meant to signify end of line then end of program. The one that works then continues on for a few hundred bytes.
    This is odd, because my program looks for the 00 00 00 string to terminate the sending of the file to the PET, so anything after it should not be sent as far as I know.

    When I try to attempt to load the failing file, it doesnt overwrite anything that is currently in memory, given that the first two bytes 01 04 (0x401) are the location in memory to start loading the file, even if it doesn't terminate properly or has errors, I would expect it to overwrite what was there.

    I wonder if it has a hidden byte at the start that im not seeing on the hex dump (which would be odd)

    Got the LOAD"$",9 working though. comes back with a directory with file sizes.

  10. #30
    Join Date
    Feb 2009
    Location
    Southern California, USA
    Posts
    2,690

    Default

    Quote Originally Posted by Gary C View Post

    I also have a bunch of PRG files and one is called Tanks, but when I copy it to the SD card and try to load it, it fails.
    Does the filename on the SD card have the .prg extension? Try it with and without the extension on the filename and see if that makes a difference.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •