logging and dosbox conf
authorJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 27 Jun 2023 21:40:38 +0000 (00:40 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 27 Jun 2023 21:40:38 +0000 (00:40 +0300)
dosbox.conf [new file with mode: 0644]
src/dos/main.c

diff --git a/dosbox.conf b/dosbox.conf
new file mode 100644 (file)
index 0000000..06dfc43
--- /dev/null
@@ -0,0 +1,43 @@
+[dosbox]
+memsize = 31
+
+[cpu]
+core = dynamic
+cycles = max 50%
+
+[sdl]
+windowresolution=1280x960
+output=opengl
+fullresolution=2560x1440
+autolock=true
+
+[render]
+aspect=true
+scaler=normal
+
+[gus]
+gus=true
+gusbase=240
+irq1=5
+irq2=5
+dma1=3
+dma2=3
+ultradir=C:\ULTRASND
+
+[midi]
+mpu401 = uart
+mididevice = default
+midiconfig = 128:0
+
+[serial]
+serial1=file file:serial.log
+
+[autoexec]
+@echo off
+mount c: /home/nuclear/dos
+mount d: .
+d:
+set PATH=%PATH%;c:\bin;C:\NC;C:\prog\nasm;C:\prog\vim\vim72;C:\windows
+set TEMP=c:\windows\temp
+set RRLOG=COM1
+echo For dev env setup: watdev, bcdev, djdev, tpdev
index 1c694c8..8bcc718 100644 (file)
@@ -18,6 +18,7 @@ along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <time.h>
 #include "app.h"
 #include "keyb.h"
@@ -47,6 +48,7 @@ int main(int argc, char **argv)
        int vmidx;
        int mx, my, mdx, mdy, prev_mx, prev_my, bnstate, bndiff;
        static int prev_bnstate;
+       char *env;
 
 #ifdef __DJGPP__
        __djgpp_nearptr_enable();
@@ -65,7 +67,14 @@ int main(int argc, char **argv)
                return 1;
        }
 
-       /*add_log_file("retroray.log");*/
+       if((env = getenv("RRLOG"))) {
+               if(tolower(env[0]) == 'c' && tolower(env[1]) == 'o' && tolower(env[2]) == 'm'
+                               && isdigit(env[3])) {
+                       add_log_console(env);
+               } else {
+                       add_log_file(env);
+               }
+       }
 
        if(vid_init() == -1) {
                return 1;