Forum: Projekte & Code [RETRO] PIC32 Nascom 2 Emulator


von Andreas J. (antibyte)


Angehängte Dateien:

Lesenswert?

Ein Nascom-2 (Baujahr 1979) emuliert in einem PIC32MX250

Eigentlich wollte ich nur sehen, ob ein Z80 Emulator in diesem
in DIL-28 erhältlichen Chip brauchbar läuft.
Dazu hab ich den Emulator von Marat Fayzullin verwendet und an
das vom Nascom 2 modifizierte Microsoft Basic von Grant Searle 
angepasst.
http://searle.hostei.com/grant/z80/SimpleZ80.html
Das lief prima über CDC USB im Terminalprogramm.
Warum aber nur das Basic, wenn man den ganzen Nascom haben kann ;)
Bei dem Japaner Katsumi 
(http://kandk.cafe.coocan.jp/blog/mycom/index.php?itemid=885)
fand ich eine NTSC Video und PS/2 Implementation für den PIC32MX150.
Da der Nascom zwingend PAL Auflösung benötigt, habe ich Katsumis Code
auf 384x256 PAL angepasst und den Nascom Font adaptiert.
Dazu noch die FATFS Routinen von Elm Chan und fertig ist der Nascom 2 :)
Es fehlt noch RS232 und die Möglichkeit CAS (Kassetten) Files zu laden,
ansonsten funktioniert alles recht gut.
NAS Files können mit F1 geladen und mit F2 gespeichert (komplettes 
memory dump von 0x1000-0x7000) werden.
Scroll Lock löst einen NMI aus.
Single step debugging (S im Monitor) funktioniert.

Quellcode demnächst.


WTF ist ein Nascom-2 ?
http://de.wikipedia.org/wiki/Nascom

Single Chip Nascom 2 Emulator

Credits:
Z80 Emulation :         : Marat Fayzullin h
Video and PS/2 based on : Katsumi
SD & FAT Filesystem     : Elm Chan, Aiden Morrison, Riccardo Leonardi


What's working :

z80 CPU
24K RAM (2K used by video buffer and NAS-SYS)
10K ROM (2K NAS-SYS 3 and 8K Microsoft Basic)
Loading NAS format files from SD card(press F1)
Saving RAM to NAS format on SD card (press F2)
Composite Video 48x16 video output, advanced graphics character ROM is 
included.
PS/2 keyboard with special keys:
  F1 - Load NAS file from SD card (works for BASIC)
  F2 - Save RAM (0x0100-0x7000) as NAS file to SD card (works for BASIC)
  Scroll lock - Trigger NMI
Single step emulation

ToDo :
RS232
Cassette Emulation (real or/and SD)
RS232 bootloader (if possible)
Map Z80PIO access to I2C Port expander, or remaining physical pins ?

Speed:
Maybe slower than the real thing, but really usable.

Thoughts:
A PIC32MX250 is used featuring USB, but there is not enought space left 
for any
USB stack.
But as the price difference to the non-USB MX150 is negligible for small
projects, it may be good to have it on board for possible reuse in 
future
projects.

First steps:
Visit http://www.nascomhomepage.com/

Type "J" after start to jump to Microsoft Basic
Most NAS files load to 0x01000. Type E1000 to run them

antibyte 11/2013

: Verschoben durch User
von Andreas J. (antibyte)


Angehängte Dateien:

Lesenswert?

Der Nascom 2 Clone passt mühelos auf eine 5x5 cm Platine, deren
Produktion einige chinesische Anbieter sehr preiswert anbieten.
Ausser dem SD-Sockel sind ist alles Through Hole, wie beim Original.
Dank des PPS Features des PIC32MX1/2 konnte ich einige
Pins so remapppen, dass die Signalwege möglichst kurz sind.

Eagle Files und Hex zum flashen im Anhang.

von Xyz X. (Firma: xyz) (khmweb)


Lesenswert?

sehr schönes Projekt! Gefällt mir ausgezeichnet gut!!

Ich bin schon neugierig auf die Source.

von Andreas J. (antibyte)


Lesenswert?

Kurzes Video vom Nascom Mini.

http://youtu.be/HImyfPlwfYM

Alle Projektdateien lade ich dieses Wochenende hoch.

: Bearbeitet durch User
von Andreas J. (antibyte)


Lesenswert?


Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.