drohne235 hat geschrieben:Bei Z80 & CP/M fällt mir aber was ein: Wenn wie eine Z80 Emulation auf den eRAM umbiegen und mit Semaphoren multicorig machen, könnten wir in mehreren 64K Pages im eRAM CP/M mehrmals starten.
Mir blitzte grad eine Idee zwischen den Hirnhälften hin und her: Es gibt verdammt kleine DOS-PC-Emulgatoren... dazu muß ich mal etwas mehr lesen. Vielleicht ist ein 8086 leichter emuliert als ein Z80?
DOS ist eh nur ein CP/M-Clone mit Directories, aber genau diese fehlen mir immer wieder unter CP/M.
Code: Alles auswählen
$ quiet git clone https://github.com/adriancable/8086tiny.git
$ cd 8086tiny
8086tiny$ make -n no_graphics
cc 8086tiny.c -DNO_GRAPHICS -O3 -fsigned-char -std=c99 -o 8086tiny
strip 8086tiny
...ich will seh'n wie klein das mit "-Os" ("s" wie "small") wird...
Code: Alles auswählen
8086tiny$ cc 8086tiny.c -DNO_GRAPHICS -Os -fsigned-char -std=c99 -o 8086tiny
8086tiny$ strip 8086tiny
8086tiny$ ls -l 8086tiny
-rwxr-xr-x 1 yeti yeti 19096 Jun 12 11:34 8086tiny
...süüüüüüß! Aber das ist geschummelt, weil dynamisch gelinkt:
Code: Alles auswählen
8086tiny$ ldd 8086tiny
linux-vdso.so.1 (0x00007ffca3da2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff1609fd000)
/lib64/ld-linux-x86-64.so.2 (0x00005584795f0000)
...also nochmal von vorn, diesmal statisch linken...
Code: Alles auswählen
8086tiny$ cc 8086tiny.c -DNO_GRAPHICS -Os -fsigned-char -std=c99 -o 8086tiny -static
8086tiny$ ldd 8086tiny
das Programm ist nicht dynamisch gelinkt
8086tiny$ strip 8086tiny
8086tiny$ ls -l 8086tiny
-rwxr-xr-x 1 yeti yeti 757320 Jun 12 11:36 8086tiny
...au weia! Es gibt explizit auf klein getrimmte C-Libs, aber davon hab ich grad keine zu Hand...
...da es nun grad kompiliert ist, will ich aber auch einen Probelauf sehn:
Code: Alles auswählen
8086tiny$ cat runme
#!/bin/sh
clear
stty cbreak raw -echo min 0
if [ -f hd.img ]
then
./8086tiny bios fd.img hd.img
else
./8086tiny bios fd.img
fi
stty cooked echo
8086tiny$ ./runme
...knall, peng, bumm und bildschirmlösch...
Code: Alles auswählen
FreeDOS kernel - SVN (build 2040 OEM:0xfd) [compiled Apr 7 2012]
Kernel compatibility 7.10 - WATCOMC - FAT32 support
(C) Copyright 1995-2011 Pasquale J. Villani and The FreeDOS Project.
All Rights Reserved. This is free software and comes with ABSOLUTELY NO
WARRANTY; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.
- InitDiskno hard disks detected
FreeCom version 0.82 pl 3 XMS_Swap [Dec 10 2003 06:49:21]
type HELP to get support on commands and navigation
A:\>dir
Volume in drive A is FREEDOS1
Volume Serial Number is 4559-120D
Directory of A:\
KERNEL SYS 45,450 04-07-2012 8:13a
COMMAND COM 66,090 12-10-2003 7:49a
CONFIG SYS 734 02-13-2014 9:06p
AUTOEXEC BAT 894 01-19-2014 2:04a
FREEDOS <DIR> 10-07-2006 10:56a
APPINFO TGZ 11,021 10-11-2006 3:00p
QUITEMU COM 5 06-19-2013 4:35p
ALLEYCAT EXE 55,067 08-26-1998 2:52p
7 file(s) 179,261 bytes
1 dir(s) 57,344 bytes free
A:\>quitemu
Aber...
Code: Alles auswählen
8086tiny$ /opt/parallax/bin/propeller-elf-gcc -Mxmm 8086tiny.c -DNO_GRAPHICS -Os -fsigned-char -std=c99 -o 8086tiny.elf
8086tiny.c:9:23: fatal error: sys/timeb.h: No such file or directory
compilation terminated.
...mal eben auf die Schnelle diesen Code durch PropGCC prügeln is' nich...
Ok... bei der Code-Dichte von XMM wär's vermutlich eh zu groß für die 512k RAM von C3+Synapse geworden...
:-(
...ein weiterer CP/M-Clone (mit Directories) wär des Atari-STs TOS...
Wie schwer wär ein 68000er zu emulieren?
...
...ich bin ja schon still!