I need help setting up an 1ChipMSX FPGA core SD card

페이지 1/3
| 2 | 3

By gaula82

Resident (45)

gaula82의 아바타

11-10-2018, 22:30

Hello there!

I have recently got a ZX-DOS, which has a port of latest KdL's OCM FPGA core.
Thing is, KdL's SD package contains a Windows-script (sdcreate.cmd), but I don't use Windows and I don't have anybody near me who does (believe me or not, people around me all use GNU/Linux or Mac).
That script seems to simply format as FAT16 and the copy some files to the SD.
The first file it copies is OCM-BIOS.DAT, so that should be enough to get to the MSX logo screen an into BASIC.
But no: instead I get a black screen!

I have formated my SD to FAT16 (using different methods, but this command line works right when I prepare an SD for the ZX-UNO MSX1 core: 'sudo mkdosfs -s 64 -F 16 /dev/sdb1'), then copied OCM-BIOS.DAT into it, then I sync the filesystems to be sure that NOTHING ELSE gets written to the card before OCM-BIOS.DAT.

Still, black screen. I need some help, please!

Login or 등록 to post comments

By luppie

Paladin (869)

luppie의 아바타

12-10-2018, 00:16

You don't need an SD to boot into Basic.
Have you tried booting without a SD card?

If the screen is still black, pleas check your screen settings using the Dip switches.
If they are correct, check your video cable. If the cable is OK, you probably have to flash the fpga using an USB Blaster cable.

By erpirao

Paragon (1334)

erpirao의 아바타

12-10-2018, 00:31

luppie wrote:

You don't need an SD to boot into Basic.
Have you tried booting without a SD card?

If the screen is still black, pleas check your screen settings using the Dip switches.
If they are correct, check your video cable. If the cable is OK, you probably have to flash the fpga using an USB Blaster cable.

he is using other fpga (ZX-dos) with a ocm port.
sorry i can´t help

By luppie

Paladin (869)

luppie의 아바타

12-10-2018, 08:18

erpirao wrote:
luppie wrote:

You don't need an SD to boot into Basic.
Have you tried booting without a SD card?

If the screen is still black, pleas check your screen settings using the Dip switches.
If they are correct, check your video cable. If the cable is OK, you probably have to flash the fpga using an USB Blaster cable.

he is using other fpga (ZX-dos) with a ocm port.
sorry i can´t help

As far as I can find, the zx-dos is a DE1 based machine. You still need to have the right VHDL loaded.
If it is flashed right, and the Dip switches are in the right position for your display, then it should boot into Basic without a SD card.

Please check Caro's site for more information on the DE1 port and the right dip switch configuration (dip 0 & 1).
http://caro.su/msx/ocm_de1.htm

By sdsnatcher73

Enlighted (4295)

sdsnatcher73의 아바타

12-10-2018, 09:51

From what I am reading on the ZX-DOS forum the KdL core ported to ZX-DOS actually needs the OCM-BIOS.DAT file on the SD to be able to boot (maybe the ROMs are not in this core due to device limitations). What is important for the KdL core is is that the SD is formatted FAT12 and the OCM-BIOS.DAT is the first file entry in the FAT. This is where it gets tricky. Windows nowadays creates a "System Volume Information" directory after formatting, which is then the first entry. Macs create some hidden files for filesystem events and spotlight which are difficult to get rid off. Anyway it is important the OCM-BIOS.DAT is the first file created on the filesystem (can be after removing the dirs/files created by the specific OS are removed).The core will just read the first file in the fat, if that is not the OCM-BIOS.DAT it will crash.

By gaula82

Resident (45)

gaula82의 아바타

12-10-2018, 11:31

Yes, the ZX-DOS port really uses OCM-BIOS.DAT on the sdcard root.
I have tried formatting the card to FAT12, with 'sudo mkfs.fat -F 12 /dev/sdb1' (I had to create a small partition for it to work: it seems impossible to format a partition as FAT12 if it's 2GB), but it still doesn't work.
OCM-BIOS.DAT is the first file written into the card: this is not Windows or MAC, it's a GNU/Linux system where every service is there because I let it be there: nothing creates anything automatically here when I mount a formatted filesystem.

This is what KdL's Windows script does (and it's supposed to work):

@echo off
rem --- 'sdcreate.cmd' v2.5 by KdL (2017.09.18)

if "%~1"=="" color 1f&title SD-Card preparing tool

:begin
if not exist "OS\MSXDOS2.SYS" (
    color f0&echo.&echo 'MSXDOS2.SYS' is missing!
    set TIMEOUT=1&goto quit_0
)
if not exist "OS\COMMAND2.COM" (
    color f0&echo.&echo 'COMMAND2.COM' is missing!
    set TIMEOUT=1&goto quit_0
)
call :title
wmic logicaldisk where drivetype=2 get deviceid, filesystem, volumename, size

rem --- Input parameters
:target
setlocal ENABLEDELAYEDEXPANSION
set TIMEOUT=1
set /p dest=Enter the target drive letter: 
if "%dest%"=="" endlocal&goto begin
set dest=%dest:~0,1%:
call :uppercase dest

set label=MSXFAT16
set /p label=Enter a label name (optional): 
set label=%label:~0,11%

rem --- Start of process
call :title
echo ### Ready to format the SD-Card "%label%" (%dest%)
echo.
echo WARNING: ALL EXISTING DATA OF THE TARGET DEVICE WILL BE DESTROYED^^!
echo Press any key to continue...
pause >nul 2>nul

set dps=dpscript.tmp
set partsize=4095

rem --- Create a partition if SD-Card is higher than 4GB
call :title
echo ### Formatting...
echo.
echo >%dps% select volume=%dest%
echo >>%dps% clean
echo >>%dps% create partition primary size=%partsize%
echo >>%dps% format fs=fat label="%label%" quick
diskpart /s %dps% >nul 2>&1
md "%dest%\System Volume Information" >nul 2>nul
if exist "%dest%\System Volume Information" goto is_higher

rem --- Create a partition if SD-Card is lower than 4GB
echo >%dps% select volume=%dest%
echo >>%dps% clean
echo >>%dps% create partition primary
echo >>%dps% format fs=fat label="%label%" quick
diskpart /s %dps% >nul 2>&1

rem --- Finalizing
:is_higher
del %dps% >nul 2>nul
if exist SDBIOS\OCM-BIOS.DAT (
    waitfor /T %TIMEOUT% pause >nul 2>nul
    if exist "%dest%\System Volume Information" rd /S /Q "%dest%\System Volume Information" >nul 2>nul
    copy SDBIOS\OCM-BIOS.DAT %dest% >nul 2>nul
)
call :title
echo ### Finalizing...
echo.
copy OS\MSXDOS2.SYS %dest% >nul 2>nul
copy OS\NEXTOR.SYS %dest% >nul 2>nul
copy OS\COMMAND2.COM %dest% >nul 2>nul

if not exist "%dest%\COMMAND2.COM" (
    call :title
    color 4f
    echo ### CRITICAL ERROR: THE TARGET DRIVE IS NOT FOUND^^!
    del OCM-BIOS.DAT >nul 2>nul
    del MSXDOS2.SYS >nul 2>nul
    del NEXTOR.SYS >nul 2>nul
    del COMMAND2.COM >nul 2>nul
    waitfor /T %TIMEOUT% pause >nul 2>nul
    goto quit_0
)

copy OS\*.* %dest% >nul 2>nul
md %dest%\HELP >nul 2>nul
md %dest%\UTILS >nul 2>nul
md %dest%\mm >nul 2>nul
copy HELP\*.HLP %dest%\HELP >nul 2>nul
copy UTILS\*.* %dest%\UTILS >nul 2>nul
copy mm\*.* %dest%\mm >nul 2>nul

rem --- End of process
echo Done^^!
:quit_0
waitfor /T %TIMEOUT% pause >nul 2>nul
goto quit

:uppercase
set %~1=!%1:a=A!
set %~1=!%1:b=B!
set %~1=!%1:c=C!
set %~1=!%1:d=D!
set %~1=!%1:e=E!
set %~1=!%1:f=F!
set %~1=!%1:g=G!
set %~1=!%1:h=H!
set %~1=!%1:i=I!
set %~1=!%1:j=J!
set %~1=!%1:k=K!
set %~1=!%1:l=L!
set %~1=!%1:m=M!
set %~1=!%1:n=N!
set %~1=!%1:o=O!
set %~1=!%1:p=P!
set %~1=!%1:q=Q!
set %~1=!%1:r=R!
set %~1=!%1:s=S!
set %~1=!%1:t=T!
set %~1=!%1:u=U!
set %~1=!%1:v=V!
set %~1=!%1:w=W!
set %~1=!%1:x=X!
set %~1=!%1:y=Y!
set %~1=!%1:z=Z!
goto:eof

:title
cls
echo OCM-SDCREATE v2.5  by KdL (2017.09.18)
echo ======================================
echo.
goto:eof

:quit
endlocal

Can you guys tell me what's the difference between this and doing something like 'sudo mkfs.fat -F 12 /dev/sdb1', or 'sudo mkdosfs -s 64 -F 16 /dev/sdb1' to create a FAT12 or FAT16 filesystem on GNU/Linux?

By sdsnatcher73

Enlighted (4295)

sdsnatcher73의 아바타

12-10-2018, 14:19

Sorry FAT16 is just fine. 4GB should be possible with FAT16 it is why the script checks if the disk is bigger than 4095MB, if not it uses all space for the partition. if it is bigger it will create a partition of 4095MB. So the second command should be fine if you created a partition of 4095MB on the SD through fdisk. Not sure if the -s 64 may not be needed or even get in the way.

If you mount the partition and do an ls -la on it, what does it show? Is the OCM-BIOS.DAT file in all CAPS?

By KdL

Paragon (1485)

KdL의 아바타

12-10-2018, 20:04

@gaula82: I confirm you that the screen remains black when the bios is not loaded.

To create an appropriate SD-Card it is necessary to:
a) format the SD-Card into FAT16;
b) remove all files included the hidden files;
c) copy the proper version of OCM-BIOS.DAT as 1st file (you can also rename it).

By gaula82

Resident (45)

gaula82의 아바타

12-10-2018, 22:44

@sdsnatcher73: This is what 'ls -la' says on the mounted FAT16 partition (I have tried with -s 64 and without it, nothing changes):

manuel@vader:~$ sudo mkdosfs /dev/sdb1
mkfs.fat 4.1 (2017-01-24)
manuel@vader:~$ ls -la /mnt/hdd/
total 520
drwxr-xr-x 2 root root   4096 oct 12 22:38 .
drwxr-xr-x 5 root root   4096 sep 26 18:33 ..
-rwxr-xr-x 1 root root 524288 oct 12 22:38 OCM-BIOS.DAT

@KdL:
This is what I do to get the card ready. I believe it's EXACTLY as you say, but using GNU/Linux commands:

manuel@vader:~$ sudo mount /dev/sdb1 /mnt/hdd/
manuel@vader:~$ sudo cp msx/sdbios/OCM-BIOS.DAT /mnt/hdd/
manuel@vader:~$ sync
manuel@vader:~$ sudo umount /dev/sdb1

If that's the case, do you suspect there's a problem with the core?

By KdL

Paragon (1485)

KdL의 아바타

13-10-2018, 01:40

This porting is not my firmware, I can not know if it has problems.
Have you tried another SD-Card? A different partition size?

By gaula82

Resident (45)

gaula82의 아바타

13-10-2018, 12:03

@KdL: Yes, I tried different cards and partition sizes. Don't worry, as time goes someone will find the same problem I guess.

페이지 1/3
| 2 | 3