Merge pull request #64 from beeanyew/main

Pull main commits into wip-crap
This commit is contained in:
beeanyew
2021-07-17 21:53:05 +02:00
committed by GitHub
5 changed files with 11705 additions and 1 deletions

View File

@@ -18,7 +18,8 @@
* The PiStorm itself is an adapter board intended to be paired with a Raspberry Pi Model 3A+. It goes in the DIP socket on and acts in place of the CPU, but functionality can be extended beyond simple CPU emulation.
* Hardware files are available in `PiStorm_RevB_EPM240_74LVC16373.zip`, but they may be out of date. Joining the Discord and checking for the latest revision/BoM for the PiStorm adapter board is recommended. Please note that just because it says "RevB_EPM240" does _NOT_ mean that all Rev B boards are EPM240s.
* Please note that the `EMP240` and `EPM570` used on the PiStorm board must be an Altera **MAX II** CPLD. There are currently some speed grade issues with the newer **MAX V** counterparts that prevent them from functioning as a replacement.
* ~~Please note that the `EMP240` and `EPM570` used on the PiStorm board must be an Altera **MAX II** CPLD. There are currently some speed grade issues with the newer **MAX V** counterparts that prevent them from functioning as a replacement.~~
* There is now an experimental bitstream available for the **MAX V** EPM240 part that can be flashed using the `flash.sh` script, but please note that this is not yet thoroughly tested and since not all silicon is created equal and this firmware requires overclocking the CPLD itself, it may not or may not work properly. Testing is currently underway.
* While the PiStorm should work with any DIP socket 16-bit 68000-powered system, the FC lines are currently not properly handled and no guarantees can be made for it working on anything except an Amiga 500, 500+ and 2000.
* General Performance with the current use of Musashi as the 68k CPU emulator is somewhere around a 70-80 MHz 68030.

View File

@@ -26,6 +26,13 @@ case $version in
echo "EPM570 detected!"
./nprog.sh
;;
"0x020a50dd")
echo "MAXV240 detected!"
echo ""
echo "! ATTENTION ! MAXV SUPPORT IS EXPERIMENTAL ! ATTENTION !"
echo ""
./nprog_maxv.sh
;;
*)
echo "Could not detect CPLD"
exit 1

30
nprog/68_maxv.cfg Normal file
View File

@@ -0,0 +1,30 @@
reset_config none
adapter driver bcm2835gpio
bcm2835gpio_peripheral_base 0x3F000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
#bcm2835gpio_speed_coeffs 146203 36
bcm2835gpio_speed_coeffs 194938 48
#bcm2835gpio_peripheral_base 0x3F000000
#bcm2835gpio_speed_coeffs 194938 48
reset_config none
adapter speed 100
# JTAG tck tms tdi tdo
bcm2835gpio_jtag_nums 26 24 27 25
#meh dummy reset to make openocd happy, set to A0 on SMI
bcm2835gpio_srst_num 5
reset_config srst_only srst_open_drain
transport select jtag
jtag newtap max2 tap -irlen 11 -expected-id 0x020a50dd
init
svf ./rtl/maxv_bitstream.svf -quiet
sleep 200
shutdown

15
nprog_maxv.sh Executable file
View File

@@ -0,0 +1,15 @@
if pgrep -x "emulator" > /dev/null
then
echo "PiStorm emulator is running, please stop it first"
exit 1
fi
echo "Flashing..."
sudo openocd -f ./nprog/68_maxv.cfg > nprog_log.txt 2>&1
if [ $? -ne 0 ]
then
echo "Flashing failed, please see nprog_log.txt for details"
exit 1
else
echo "Flashing successful!"
fi

11651
rtl/maxv_bitstream.svf Normal file

File diff suppressed because it is too large Load Diff