DeMiSTify Tatung Einstein - Maverick-Shark/retroGuru GitHub Wiki

  • RetroCrypta: 20220119 - Nueva release de MiSTery para MiST. y más .RetroWiki - (7759.0s)
  • RetroWiki

DeMiSTerización del Tagtung Einstein

  • Dentro de la carpeta /Crypta/ tenemos tres subdirectorios:
SVI328_DeMiSTify
TatungEinstein_deMiSTify
TatungEinstein_MiSTer
  • Vamos a la carpeta firmware para editar el fichero config.h
$ cd firmware
$ cp ../DeMiSTify/templates/config.h .
$ joe config.h                                   // vi (edit) config.h
  • Y cambiar en la sección 'Disk Image support', #undef por #define:
#define CONFIG_DISKIMG
#define CONFIG_DISKIMG_UNITS 2
  • Y también en 'Joystick events', cambiar a #undef:
#undef CONFIG_EXTJOYSTICK

make firmware

  • Dentro de la carpeta 'TatungEinstein_DeMiSTify:':
$ cd ..
$ make firmware
  • Pero falla!!
$ ls -la
$ rm *~                                          // borra projects_files.rtl~ (el temporal)
$ make firmware clean
  • Volvemos a la carpeta firmware:
$ cd firmware
$ :> overrides.c
$ cd ..
$ make firmware clean
$ make firmware
  • Después del make firmware hacemos un clean del 'escenario'
$ ls -l firmware/*.vhd
$ ls -l firmware/*.o
$ cd firmware
$ rm *.o
$ rm *.asm
$ rm controller*
$ rm config.h~
  • Queda únicamente:
$ ls -la
        config.h
        overrides.c
  • En /crypta/TatungEinstein_DeMiSTify:
$ cd DeMiSTify
$ ls -la
$ less site.mk
  • NOTA 1: En el fichero site.mk es donde se indica las rutas donde está instalado Quartus.

  • NOTA 2: Para MiST se usa el Quartus v13.0. La versión v17.1 es valida para DeMiSTificar.

  • NOTA 3: En la carpeta DeMiSTify/templates estan los templates de las placas elegibles a portar el core DeMiStificado.

  • En el fichero Makefile (ubicado en TatungEinstein_DeMiSTify) cambiamos la entrada PROJECT para definir el nombre del core:

PROJECT=TatungEinstein
  • En el fichero project_files.rtl hemos definido el fichero FILES.qip:
# files inherited from the guest core:
FILES.qip
  • En la carpeta firmware tenemos dos ficheros:
$ less override.c

Que en este caso, está vacio y permitiría hacer un override de las funciones (.vhd) que quisiéramos.

$ less config.h

Y contiene las definiciones de los periféricos, cómo el ratón, el CD-ROM, imágenes de disco...

  • NOTA 1: El Tatung Einstein tiene una única unidad de disco, por tanto, en el fichero config.h se define:
#define CONFIG_DISKIMG
#define CONFIG_DISKIMG_UNITS 1
  • NOTA 2: En el fichero config.h, también se defgine si el core usa o no ROM y además, se define el nombre del fichero de la ROM.
/* autoboot ROM
#undef ROM_REQUIRED

/* ROM name
#undef ROM_FILENAME "CORE ROM"

Hacemos el make firmware

  • Volvemos al dir del TatungEinstein_DeMiSTify para lanzar el make firmware:
$ cd ..
$ make firmware

Que compila el firmware y genera un controller.bin y un controller.map además de los ficheros .vhd.

$ less *.vhd*
$ less firmware/*.vhd

Hacemos el make board

  • Dentro del dir TatungEinstein_DeMiSTify:
$ make BOARD=neptuno
  • Pero falla ya que le faltan cositas!!!

  • Copiamos el fichero neptuno.top de la carpeta DeMiSTify/templates/neptuno a la carpeta de la placa (board), que en nuestro caso es neptuno (/crypta/TatungEinstein_DeMiSTify/neptuno):

$ cd neptuno
$ cp ../DeMiSTify/templates/neptuno/neptuno_top.vhd .

Con Quartus

  • Abrimos el Quartus
$ /mnt/c/intelFPGA_lite/21.1/quartus/bin64/quartus.exe &
$ bg                                              // muestra los procesos en background
  • Y le cargamos el proyecto generado con el DeMiSTify: TatungEinstein_Neptuno.qpf

  • Y al sintetizar, falla!!!

  • Entonces, ubicados en el dir 'TatungEinstein_DeMiSTify', copiamos los .sv de MiSTer y del SVI328:

$ cp ../TatungEinstein_MiSTer/TatungEinstein_MiSTer.sv .
$ cp ../SVI328_DeMiSTify/SVI328.sv .
  • También copiamos el fichero FILES.qip y la carpeta sys:
$ cp ../TatungEinstein_MiSTer/FILES.qip .
$ mkdir sys
$ cd sys
$ cp ../../SVI328_DeMiSTify/sys/* .
  • Editamos el fichero FILES.qip:
$ joe FILES.qip

Para poner la ruta correcta de donde se encuentran los rtl (concatenar 'FILE ' por 'FILE ../rtl').

Find (^K H for help): FILE 
Replace with (^K H for help): FILE .../
  • Seguimos copiando la carpeta rtl:
$ mkdir rtl
$ cd rtl
$ cp -r ../../TatungEinstein_MiSTer/rtl/* .

Links