Closed Ericounet closed 1 month ago
The whole point of using an emulator is that you don't need an sdcard.
I'll double-check the instructions, but you should not need to mount or insert an sdcard at all for running the emulator. There should be no need to use the /dev/sd? mount points. You should use the SDCard.img file you created.
It's possible the instructions for creating this image file are broken and I will check them.
hi @productiondave , I followed the manual you wrote, the part on the emulator (I read it all of course). I think, there is a typo in the chapter on the emulator. Here : ./2063 -r boot/firmware.bin -S filesystem/SDcard.img I tried and could not get the result you showed just below the command. And that's because there is a mistake in the command line : the parameter "filesystem/SDcard.img" is wrong, it must be /dev/sda (or the letter where your sdcard is connected; for me, sdc. Thanks a lot for the manual ! It helped. 😄
Here are the steps I followed, and the error I encountered ; you can find the line of the error below at the line : Error!Error!
Using the Etched Pixels Emulator Kit
The Etched Pixels Emulator kit supports the “Z80-Retro!” along with many other homebrew projects.
Clone and Build
Clone the Etched Pixels Emulator Kit github repository here from here: https://github.com/EtchedPixels/EmulatorKit
Compilation takes a while as it compiles all the emulators for the different supported projects.
Testing
Now that you have the emulator binary you should be ready to go.
Preparing the firmware and the sdcard image
You will need to prepare the firmware image and the SD Card image for use with the emulator. As we don’t have a real formatted SD Card to work with we need to create an SDcard.img file that will have the correctly formatted partitions on it.
Create the ROM Image
The emulator expects the firmware image to be exactly 16KB in size. Use the truncate command in Linux to do that.
Validate that the last line is 00004000 (0x4000 in hex) or 16K.
Testing
Create the SD Card Image
!!! WARNING !!! This process can damage your host file system if you get it wrong. Make sure you only format the loop device after setting it up.
This step is a bit more complicated and these steps are definitely ONLY going to work on a Linux host.
Testing
Whew! Now that you have an image file with partitions on it, you can copy the retro.img CP/M file system on to it.
Testing
[sudo] Mot de passe de eric : mkfs.fat 4.2 (2021-01-31) eric@aldebaran:~/Projets-Z80-retro/z80-retro/2063-Z80-cpm/filesystem$ sudo mkfs.msdos /dev/loop4p2 mkfs.fat 4.2 (2021-01-31)
Error!Error!
Correction
eric@aldebaran:~/Projets-Z80-retro/z80-retro/2063-Z80-cpm/filesystem$ sudo dd if=drive.img of=/dev/loop4p1 bs=512 800+0 enregistrements lus 800+0 enregistrements écrits 409600 octets (410 kB, 400 KiB) copiés, 0,00302325 s, 135 MB/s eric@aldebaran:~/Projets-Z80-retro/z80-retro/2063-Z80-cpm/filesystem$
Finally unmount the loopback disk.
Testing
Done and OK.
You should now have a 500MB SDcard.img file.
Running the Emulator
To distinguish this “Z80-Retro!” project from a different Z80-Retro project, the author has named the emulator 2063 after the board number.
Exit the emulator by typing CTRL+\
Testing
Done and OK
Exit the emulator by typing CTRL+\