maikmerten / SKERNAL

A very Stupid (and currently useless) KERNAL-wannabe for 6502 computers
MIT License
0 stars 0 forks source link

Problems trying to get this going on multicomp #1

Open okwatts opened 4 years ago

okwatts commented 4 years ago

I have been having difficulty in implementing this on the multicomp. The code runs except for reading the sd card. I am using a 1 GB sd card formatted for FAT 16 and it appears not to get the boot block parameters correct. If I dump page 3 all the vital data is zero and thus a ls gives garbage. I would appreciate an image of a working sd to see why my version is not working. I have successfully implemented Neil Crooks 6809 version and the Z80 mgc1024 examples from retrobrew on the cyclone II-c version. I would like to look at implementing RIchard Leary's DOS/65 so I had hoped to look at your code to get the reading of the SD card in 6502 assembly as an example. Also I understand you used SYMON for development but how do you do this for the SDcard image? I realize that this is an old project for you bu I would appreciate some help. Thanks Larry

okwatts commented 4 years ago

Sorry meant to add the link to the hardware/software on retrobrew i referred to. https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:multicomp:cycloneii-c:start

maikmerten commented 4 years ago

Hi, it's been a while since I last had a look, but I still happen to have my local build around. You're right, I developed this in Symon but I'm pretty sure I had this running on a FPGA Multicomp as well.

I still happen to have my development environment from years back on my hard drive. Find enclosed an archive with rom.bin, sd.img and an old version of Symon. I confirmed that these these file work well together, detecting the file system and successfully loading programs into memory. worksforme.zip

Things that might be relevant:

I hope this can help you to get the system up and running!

okwatts commented 4 years ago

Thanks for getting back to me. I'm away for the weekend but will try this and let you know when I return home.

On Sun, Aug 30, 2020, 2:45 AM maikmerten notifications@github.com wrote:

Hi, it's been a while since I last had a look, but I still happen to have my local build around. You're right, I developed this in Symon but I'm pretty sure I had this running on a FPGA Multicomp as well.

I still happen to have my development environment from years back on my hard drive. Find enclosed an archive with rom.bin, sd.img and an old version of Symon. I confirmed that these these file work well together, detecting the file system and successfully loading programs into memory. worksforme.zip https://github.com/maikmerten/SKERNAL/files/5146564/worksforme.zip

Things that might be relevant:

  • I think that my FAT code is for FAT32, not FAT16 or FAT12
  • On a quick glance, I don't see code to handle MBR partition tables, so the file system should span the whole SD card, without a partition table (like a really big floppy)
  • I'm not sure what generation of SD cards the Multicomp SD card controller is geared towards. I think I remember using something like a very old and tiny 64 MB SD card (which, obviously, would still be overkill) and not something in the range of gigabyte devices. Then again, I think 1 Gigabyte SD cards should still use the original SD standard and not, e.g., SDHC, so this might not be an issue after all.

I hope this can help you to get the system up and running!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maikmerten/SKERNAL/issues/1#issuecomment-683399407, or unsubscribe https://github.com/notifications/unsubscribe-auth/APALSOM4J5I67MOIF6GKCVLSDINVBANCNFSM4QPBE66A .

okwatts commented 4 years ago

Hi, your files worked fine in symon and when I copied the sd.img to my sd card it ran fine on the Multicomp. The problem is in my sd card when formatted for the whole 1 GB. I will try and sort out the issues as the boot sector and boot parameter block appear okay but I will check your code to see if it is dealing with 32 sector clusters properly. Also my formatting included a volume label directory which may have screwed things up. I will play around with different card images. I will have to try tracing through your code to check this. The image is FAT 16 and I will check out your tiny load code using this sd format as well. Thanks for your help and I'll let you know what I find and when I get more programming done. Larry

On Sun, Aug 30, 2020 at 9:45 AM Larry Watts larry.watts1@gmail.com wrote:

Thanks for getting back to me. I'm away for the weekend but will try this and let you know when I return home.

On Sun, Aug 30, 2020, 2:45 AM maikmerten notifications@github.com wrote:

Hi, it's been a while since I last had a look, but I still happen to have my local build around. You're right, I developed this in Symon but I'm pretty sure I had this running on a FPGA Multicomp as well.

I still happen to have my development environment from years back on my hard drive. Find enclosed an archive with rom.bin, sd.img and an old version of Symon. I confirmed that these these file work well together, detecting the file system and successfully loading programs into memory. worksforme.zip https://github.com/maikmerten/SKERNAL/files/5146564/worksforme.zip

Things that might be relevant:

  • I think that my FAT code is for FAT32, not FAT16 or FAT12
  • On a quick glance, I don't see code to handle MBR partition tables, so the file system should span the whole SD card, without a partition table (like a really big floppy)
  • I'm not sure what generation of SD cards the Multicomp SD card controller is geared towards. I think I remember using something like a very old and tiny 64 MB SD card (which, obviously, would still be overkill) and not something in the range of gigabyte devices. Then again, I think 1 Gigabyte SD cards should still use the original SD standard and not, e.g., SDHC, so this might not be an issue after all.

I hope this can help you to get the system up and running!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maikmerten/SKERNAL/issues/1#issuecomment-683399407, or unsubscribe https://github.com/notifications/unsubscribe-auth/APALSOM4J5I67MOIF6GKCVLSDINVBANCNFSM4QPBE66A .

okwatts commented 3 years ago

Hi it's been awhile but I have been using the code on both SYMON and the Multicomp. I did find one small bug in the sector write code "io.asm" that meant missing the first byte in every block. code section below:

lda #1 ; sta ARG1 ; see comment in 2 lines sta SDCONTROL ; issue write command lda #0 ; this fixes a write error where the first byte was missing sta ARG1

Apart from that the other peculiarity is that while the files on the SD card are listed with an "ls" command, if there are more than 8 files (with 32 bytes extra? + 32 bytes real data) in the directory sector typically the first 8 files are returned "file not found" if you try and load them. The last up to 8 files do load by name. I haven't gotten to the bottom of that but usually just correct the directory and fat to write a new image on the sd card. The code has been very useful to me and I have gotten some programs like assmted (Carl Moser) and fig-forth to run (I'm having some trouble getting the forth load and list screens to work) but at least I have some challenges of my own to solve. I modified a monitor program like SBCOSlite from Daryl Rictor to run and use your read/write sector routines as well as the FAT based structures to transfer from my PC to the multicomp. Thanks again.

On Tue, Sep 1, 2020 at 10:56 AM Larry Watts larry.watts1@gmail.com wrote:

Hi, your files worked fine in symon and when I copied the sd.img to my sd card it ran fine on the Multicomp. The problem is in my sd card when formatted for the whole 1 GB. I will try and sort out the issues as the boot sector and boot parameter block appear okay but I will check your code to see if it is dealing with 32 sector clusters properly. Also my formatting included a volume label directory which may have screwed things up. I will play around with different card images. I will have to try tracing through your code to check this. The image is FAT 16 and I will check out your tiny load code using this sd format as well. Thanks for your help and I'll let you know what I find and when I get more programming done. Larry

On Sun, Aug 30, 2020 at 9:45 AM Larry Watts larry.watts1@gmail.com wrote:

Thanks for getting back to me. I'm away for the weekend but will try this and let you know when I return home.

On Sun, Aug 30, 2020, 2:45 AM maikmerten notifications@github.com wrote:

Hi, it's been a while since I last had a look, but I still happen to have my local build around. You're right, I developed this in Symon but I'm pretty sure I had this running on a FPGA Multicomp as well.

I still happen to have my development environment from years back on my hard drive. Find enclosed an archive with rom.bin, sd.img and an old version of Symon. I confirmed that these these file work well together, detecting the file system and successfully loading programs into memory. worksforme.zip https://github.com/maikmerten/SKERNAL/files/5146564/worksforme.zip

Things that might be relevant:

  • I think that my FAT code is for FAT32, not FAT16 or FAT12
  • On a quick glance, I don't see code to handle MBR partition tables, so the file system should span the whole SD card, without a partition table (like a really big floppy)
  • I'm not sure what generation of SD cards the Multicomp SD card controller is geared towards. I think I remember using something like a very old and tiny 64 MB SD card (which, obviously, would still be overkill) and not something in the range of gigabyte devices. Then again, I think 1 Gigabyte SD cards should still use the original SD standard and not, e.g., SDHC, so this might not be an issue after all.

I hope this can help you to get the system up and running!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maikmerten/SKERNAL/issues/1#issuecomment-683399407, or unsubscribe https://github.com/notifications/unsubscribe-auth/APALSOM4J5I67MOIF6GKCVLSDINVBANCNFSM4QPBE66A .

maikmerten commented 3 years ago

Cool, thanks for reporting on your voyage! I'm sorry that you have to deal with some bug-oversights on my part and hope that this will not impact your future progress! Looking at my own code from a few years back I'm in a constant "I did... this?"-mode and finding fixes certainly is an intimidating task...