Skip to content

Commit

Permalink
Merge pull request #11 from fbelavenuto/organizing
Browse files Browse the repository at this point in the history
Organizing Files, compiling bitstream with docker and fixing case of SD filenames
  • Loading branch information
fbelavenuto authored Dec 11, 2023
2 parents 2b3564e + 395c883 commit f440122
Show file tree
Hide file tree
Showing 111 changed files with 125 additions and 1,947 deletions.
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
*.lk
*.map
*.noi

/CPLD/_xmsgs
/CPLD/iseconfig
*.zip
/CPLD/*.xwbt
/CPLD/*.jed
/CPLD/*.prj
/CPLD/*.bld
/CPLD/*.cmd_log
/CPLD/*.gise
Expand All @@ -31,18 +28,19 @@
/CPLD/*.tspec
/CPLD/*.vm6
/CPLD/*.xml
/CPLD/*.xst
/CPLD/*.html
/CPLD/sdmapper_html/fit
/CPLD/sdmapper_html/images
/CPLD/sdmapper_html/tim
/CPLD/*.xrpt
/CPLD/*.csv
/CPLD/*.srp
/CPLD/src/*.lfp
/CPLD/*.err
/CPLD/iseconfig
/CPLD/_xmsgs
/CPLD/sdmapper_html/fit
/CPLD/sdmapper_html/images
/CPLD/sdmapper_html/tim
/CPLD/xlnx_auto_0_xdb
/CPLD/xst/work
/Updater/NEW/obj
/CPLD/src/tb_spi/transcript
/CPLD/src/tb_spi/vsim.wlf
/CPLD/src/tb_spi/work
Expand All @@ -51,5 +49,5 @@
/CPLD/src/tb_spi2/work
/SW/Updater/obj
/Driver/*.ROM
/driver/DRIVER.BIN
/SW/Updater/FBL-UPD.COM
/SW/Updater/SDM-UPD.COM
47 changes: 47 additions & 0 deletions CPLD/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

DESIGN = sdmapper
DEVICE = XC95144XL-10-TQ100
UCF_FILE = src/pinout_final.ucf

# Make all runs to place & route
all : bitstream

# bitstream : Creates device bitstream
bitstream : ${DESIGN}.jed

# translate: Stops after full design elaboration for analysis and floorplanning prior to place and route step
translate : ${DESIGN}.ngd

# Following executes the ISE run

# Produces: .lso .ngc .ngr .srp *_xst.xrpt _xmsgs/
${DESIGN}.ngc: ${DESIGN}.xst
xst -intstyle ise -ifn $<

# Produces: .bld .ngd *_ngdbuild.xrpt _xmsgs/ xlnx_auto_0_xdb/
${DESIGN}.ngd : ${DESIGN}.ngc ${UCF_FILE}
ngdbuild -intstyle ise -uc ${UCF_FILE} -p ${DEVICE} ${DESIGN}.ngc $@

# Produces: .mfd .pad .pnx .rpt .vm6 .xml _build.xml _pad.csv _html/ _xmsgs/
${DESIGN}.vm6 : ${DESIGN}.ngd
cpldfit -intstyle ise -p ${DEVICE} -ofmt vhdl -optimize density -htmlrpt -loc on -slew fast -init low -inputs 54 -pterms 90 -unused float -power std -terminate keeper $?
XSLTProcess ${DESIGN}_build.xml

# produces .nga
${DESIGN}.nga: ${DESING}.vm6
tsim -intstyle ise ${DESIGN} $@

# Produces _xmsgs/ .jed
${DESIGN}.jed: ${DESIGN}.vm6
hprep6 -s IEEE1149 -n ${DESIGN} -i ${DESIGN}
mv $@ ${DESIGN}_${VERSION}.jed

# Clean up all the files from the Vivado run
clean:
rm -rf *.ngd *.bit *.map *.bld *.xml *.html *.jed *.nga *.err \
*.xrpt *.txt *.pad *.csv xlnx_auto* _xmsgs *.lso *_html *.xml \
*.ngc *.ngr *.srp *.lst *.gyd *.mfd *.pnx *.rpt *.vm6

# Tar and compress all the files
tar:
tar -czvf ${DESIGN}.tar.gz *.ipf *.xsl *.prj *.svf *.xise *.xst *.xsvf Makefile
1 change: 1 addition & 0 deletions CPLD/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0
1,714 changes: 0 additions & 1,714 deletions CPLD/sdmapper.jed

This file was deleted.

4 changes: 4 additions & 0 deletions CPLD/sdmapper.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vhdl work "src/spi.vhd"
vhdl work "src/mapper.vhd"
vhdl work "src/exp_slot.vhd"
vhdl work "src/sdmapper.vhd"
29 changes: 29 additions & 0 deletions CPLD/sdmapper.xst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set -tmpdir "/tmp"
set -xsthdpdir "xst"
run
-ifn sdmapper.prj
-ifmt mixed
-ofn sdmapper
-ofmt NGC
-p xc9500xl
-top sdmapper
-opt_mode Speed
-opt_level 2
-iuc NO
-keep_hierarchy Yes
-netlist_hierarchy As_Optimized
-rtlview Yes
-hierarchy_separator /
-bus_delimiter <>
-case Maintain
-verilog2001 YES
-fsm_extract YES -fsm_encoding Auto
-safe_implementation No
-mux_extract Yes
-resource_sharing YES
-iobuf YES
-pld_mp YES
-pld_xp YES
-pld_ce YES
-wysiwyg NO
-equivalent_register_removal YES
Binary file removed Nextor/Nextor-2.1.0.base.dat
Binary file not shown.
Binary file added Nextor/Nextor-2.1.2.base.dat
Binary file not shown.
1 change: 1 addition & 0 deletions Nextor/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.2
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@

This documentation describes Open Hardware and is licensed under the CERN OHL v. 1.1.

You may redistribute and modify this documentation under the terms of the CERN OHL v.1.1. (http://ohwr.org/cernohl). This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE.
You may redistribute and modify this documentation under the terms of the [CERN OHL v.1.1](http://ohwr.org/cernohl). This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE.

Please see the CERN OHL v.1.1 for applicable conditions

# Project description

This project implements a cartridge-shaped interface to add a mass storage device using up to two SD (Secure Digital) and a 512K Mapper for MSX line computers.

Nextor [1] was used as operating system, being developed only the driver to have access to the two SD cards. Nextor is an open project.
[Nextor](http://www.konamiman.com/msx/msx-e.html#nextor) was used as operating system, being developed only the driver to have access to the two SD cards. Nextor is an open project.

Nextor is an evolution of MSX-DOS 2 natively supporting FAT16 partitions up to 4GB, and can have 4 partitions per SD card. 128KB of Mapper is required on the minimum to use Nextor with access to sub-directories, less than 128K mapper only allows the use of the MSXDOS1 kernel, limiting partitions with FAT12 and maximum 16MB per partition.

One of the switches enables or disables the Mapper in conjunction with a slot expander. The second key allows you to select between two driver options, useful for having a backup a stable version of the driver and use it to restore a new driver update failed.

A utility called "FBL-UPD.COM" was created to be able to update the flash by MSX itself.

To compile the FBL-UPD.COM driver and utility use the cross-compiler SJASMPLUS [2] and to compile the CPLD code use Xilinx ISE Webpack [3].
To compile the FBL-UPD.COM driver and utility use the [Konaniman's Nestor80](https://github.com/Konamiman/Nestor80) and to compile the CPLD code use [Xilinx ISE Webpack](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive-ise.html).

Technical details:
- The CPLD code implements all the necessary logic, implementing an expander of standard slots, one SPI mode 0 port, standard ASCII16 MegaROM control used by Nextor and the 512K Mapper control.
Expand All @@ -34,14 +34,6 @@ Technical details:

Thanks to FRS for rewriting the driver, to Luciano Sturaro for board routing and the MSXBR-L community for their support and encouragement.

## References

[1] http://www.konamiman.com/msx/msx-e.html#nextor

[2] http://sourceforge.net/projects/sjasmplus/

[3] http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm

# Quickstart guide

After assembling the device, or buying a ready-made one, get an SD card, put it in the interface and start MSX.
Expand All @@ -50,20 +42,21 @@ When dropping into BASIC, type `CALL FDISK` to start formatting the SD card. The

After partitioning and formatting, shut down MSX, remove the SD card and put it on your PC, copy the contents of the ./SD folder into the first partition of the SD card and put it back in MSX.

For more information on how to use Nextor, visit [User Manual](https://github.com/Konamiman/Nextor/blob/v2.1/docs/Nextor%202.1%20User%20Manual.md)

# Readme in portuguese

Este projeto implementa uma interface em forma de cartucho para adicionar um dispositivo de armazenamento em massa utilizando até dois cartões SD (Secure Digital) e uma Mapper de 512K para computadores da linha MSX.

Foi utilizado como sistema operacional o Nextor [1] sendo desenvolvido somente o driver para se ter acesso aos dois cartões SD. O Nextor é um projeto aberto.
Foi utilizado como sistema operacional o [Nextor](http://www.konamiman.com/msx/msx-e.html#nextor) sendo desenvolvido somente o driver para se ter acesso aos dois cartões SD. O Nextor é um projeto aberto.

O Nextor é uma evolução do MSX-DOS 2 tendo nativamente suporte a partições FAT16 de até 4GB, podendo ter 4 partições por cartão SD. É necessário 128KB de Mapper no mínimo para utilizar o Nextor com acesso à sub-diretórios, menos que 128K de mapper permite somente o uso do kernel do MSXDOS1 limitando em partições com FAT12 e máximo de 16MB por partição.

Uma das chaves habilita ou não a Mapper em conjunto com um expansor de slot. A segunda chave permite selecionar entre duas opções de driver, útil para se ter um backup de uma versão estável do driver e utilizá-lo para restaurar um driver novo com falha na atualização.

Foi criado um utilitário chamado "FBL-UPD.COM" para poder atualizar a flash pelo próprio MSX.

Para compilar o driver e o utilitário FBL-UPD.COM utilize o cross-compiler SJASMPLUS [2] e para compilar o código do CPLD utilize o Xilinx ISE Webpack [3].
Para compilar o driver e o utilitário FBL-UPD.COM utilize o [Nestor80 do Konaniman](https://github.com/Konamiman/Nestor80) e para compilar o código do CPLD utilize o [Xilinx ISE Webpack](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive-ise.html).

# Agradecimentos

Expand All @@ -84,12 +77,4 @@ Ao cair no BASIC, digite `CALL FDISK` para iniciar a formatação do cartão SD.

Após o particionamento e formatação, desligue o MSX, retire o cartão SD e coloque no seu PC, copie o conteúdo da pasta ./SD para dentro da primeira partição do cartão SD e recoloque no MSX.

# Referências:

[1] http://www.konamiman.com/msx/msx-e.html#nextor

[2] http://sourceforge.net/projects/sjasmplus/

[3] http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm

[4] https://github.com/Konamiman/Nextor/blob/v2.1/docs/Nextor%202.1%20User%20Manual.md
Maiores informações de como usar o Nextor acesse o [Manual do usuário](https://github.com/Konamiman/Nextor/blob/v2.1/docs/Nextor%202.1%20User%20Manual.md)
File renamed without changes.
Binary file added SD/DOS/CONCLUS.COM
Binary file not shown.
Binary file modified SD/DOS/EMUFILE.COM
Binary file not shown.
Binary file removed SD/DOS/MSXDOS.SYS
Binary file not shown.
Binary file modified SD/DOS/NEXBOOT.COM
Binary file not shown.
Binary file added SD/DOS/VSFT.COM
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file modified SD/NEXTOR.SYS
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f440122

Please sign in to comment.