diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2024-11-21 21:12:50 -0500 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2024-11-21 21:12:50 -0500 |
commit | bb57132e82294cf951f574a8f5a96e0566de0201 (patch) | |
tree | fd6ba97b93b84eb31ea567d4f5a4518a441bc01f /gwfetch.bas | |
parent | 924d835322a34611795f8f8477795fc4579a06d1 (diff) | |
download | GWFetch-bb57132e82294cf951f574a8f5a96e0566de0201.tar.gz GWFetch-bb57132e82294cf951f574a8f5a96e0566de0201.zip |
Added true detection of DOSBox by reading the BIOS version. Added graphic for DRDOS
Diffstat (limited to 'gwfetch.bas')
-rw-r--r-- | gwfetch.bas | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/gwfetch.bas b/gwfetch.bas index 12b20f5..9ff7809 100644 --- a/gwfetch.bas +++ b/gwfetch.bas @@ -21,7 +21,12 @@ 280 GOSUB 12000:GOSUB 12300
290 REM Get a machine name
+295 DOSBOX = 0
300 GOSUB 14000
+302 IF CPUID% <> 7 THEN GOTO 310
+303 GOSUB 14500
+304 IF DOSBOX = 0 THEN GOTO 310
+305 MACHINE$ = DBNAME$ + " (Emulator)"
310 REM DOS version
320 GOSUB 12500
@@ -32,7 +37,8 @@ 500 REM Just produce an MSDOS logo for now
510 DIM LOGO$(25)
-520 IF INSTR(INTERP$, "DOSBox") > 0 THEN GOSUB 20050:GOTO 1000
+520 IF DOSBOX = 1 THEN GOSUB 20050:GOTO 1000
+530 IF OEM% = &HEE THEN GOSUB 20100:GOTO 1000
530 GOSUB 20000
1000 REM Output time
@@ -380,6 +386,23 @@ 14270 IF MACHID = 49 THEN MACHINE$ = "Sperry PC":GOTO 14299
14299 RETURN
+14500 REM Detect DOSBox for real
+14510 DEF SEG=&HF000
+14530 BIOSVER$ = SPACE$(128)
+14540 FOR I = 0 TO 128
+14550 JC = PEEK(&HE000 + I)
+14560 IF JC >= 33 AND JC <= 126 THEN MID$(BIOSVER$, I+1, 1) = CHR$(JC)
+14570 NEXT I
+14580 DEF SEG
+14590 I = INSTR(BIOSVER$, "DOSBox")
+14600 IF I = 0 THEN RETURN
+14610 FOR J = I+6 TO 128
+14620 IF MID$(BIOSVER$, J, 1) = " " THEN GOTO 14640
+14630 NEXT J
+14640 DBNAME$ = MID$(BIOSVER$, I, J-I)
+14645 DOSBOX = 1
+14650 RETURN
+
20000 REM MS-DOS Logo
20010 LOGO$(1) = " "
20011 LOGO$(2) = " &&&&&& &&&&&& &&&&&&&&"
@@ -436,6 +459,33 @@ 20075 LOGO$(25) = " "
20076 RETURN
+20100 REM DOSBox Logo
+20101 LOGO$(1) = " "
+20102 LOGO$(2) = " XXXXX"
+20103 LOGO$(3) = " XXXXXXXXX"
+20104 LOGO$(4) = " XXXXXXXXXXXXXXXX"
+20105 LOGO$(5) = " XXXX XXXXXXX"
+20106 LOGO$(6) = " XX XXXXX"
+20107 LOGO$(7) = " XX XXXXX"
+20108 LOGO$(8) = " XX XXXXX"
+20109 LOGO$(9) = " XX XXXX"
+20110 LOGO$(10) = " XXX XXXXX"
+20111 LOGO$(11) = " XX XXXX"
+20112 LOGO$(12) = " XX XXXXX"
+20113 LOGO$(13) = " XX XXXXX"
+20114 LOGO$(14) = " XX XXXXX"
+20115 LOGO$(15) = " XXXX XXXXXXX"
+20116 LOGO$(16) = " XXXXXXXXXXXXXXXX"
+20117 LOGO$(17) = " XXXXXXXXX"
+20118 LOGO$(18) = " XXXXX"
+20119 LOGO$(19) = " "
+20120 LOGO$(20) = " .-,--. .-,--. .-,--. ,,--. .---."
+20121 LOGO$(21) = " ' | \ `|__/ ' | \ |`, | \___ "
+20122 LOGO$(22) = " , | / )| \ , | / | | \"
+20123 LOGO$(23) = " `-^--' `' ` `-^--' `---' `---'"
+20124 LOGO$(24) = " "
+20125 LOGO$(25) = " "
+20126 RETURN
30000 REM String Trim Function
30010 REM input/output: TOTRIM$
|