Yet Another Apple Emulator - Patches
There are tons of great free and shareware emulators for my MacOS X Laptop, but I want to use my beefy Linux workstation... I can SURELY get better than twice the speed of an original 6502!
I found YAE — Yet Another Apple Emulator, but I had to patch the source a little to make it compile on a modern gcc. I'll package them better soon (and mail the maintainer), but for now my POST ./configure patches are below.
Also of note, the speed limiter (to the authentic 1.04MHz) is implemented in speed.c if you want to increase the speed or disable it. Since I just want to edit and assemble, the timing shouldn't matter for me and I now have a WAY fast emulated Apple //e ;)
--- iou.h 1998-11-26 19:24:56.000000000 +1100 +++ ../yae-0.6-patched/iou.h 2004-11-21 23:54:20.000000000 +1100 @@ -143,5 +143,7 @@ unsigned long GetIOUSoftSwitch(void); BYTE AppleIORead( ADDR ); void AppleIOWrite( ADDR, BYTE ); +void printer_byte( BYTE ); +void init_printstream( void ); #endif /* _IOU_H_ */
--- iou.c 1998-11-29 23:27:52.000000000 +1100
+++ ../yae-0.6-patched/iou.c 2004-11-21 23:53:26.000000000 +1100
@@ -547,7 +547,12 @@
return data;
}
-FILE *printstream=stdout;
+FILE *printstream;
+void init_printstream (void)
+{
+ printstream = stdout;
+}
+
void printer_byte(BYTE data)
{
data &= 0x7f; /* Remove hi-bit */
--- main.c 1998-11-29 20:45:20.000000000 +1100 +++ ../yae-0.6-patched/main.c 2004-11-21 23:53:53.000000000 +1100 @@ -73,6 +73,7 @@ setDefaultOptions(); ParseConfigFile(); processOptions(argc,argv); + init_printstream(); /* mount disks */ if (optind<argc) disk_name[6][0]=argv[optind++];
--- Makefile 2004-11-22 00:02:05.000000000 +1100 +++ ../yae-0.6-patched/Makefile 2004-11-22 00:00:49.000000000 +1100 @@ -15,7 +15,7 @@ X_CFLAGS= -I/usr/X11R6/include X_LIBS= -L/usr/X11R6/lib -X_EXTRA_LIBS= +X_EXTRA_LIBS= -lX11 -lXext X_PRE_LIBS= DEFS= -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1
11:12 AM, 03 Dec 2004 by Mark Aufflick Permalink
Nevermind...
It seems I was trying to run //gs only disks. For anyone else who happens to stumble upon this page, two things I had to do to make YAE work for me: 1) cutting-and-pasting the above patch for Makefile didn't work for me. The line: +X_EXTRA_LIBS= -lX11 -lXext wasn't added... 2) Pressing F1 to swap disks would always cause a seg-fault after I entered the name of the new disk. I had to comment out the following lines in x_window.c: /* ctkwan: free previosly allocated string */ /* if( disk_name[6][0]!=NULL) free( disk_name[6][0] ); */ thanks for the tips, -m
by Unregistered Visitor on 03/22/05
How to run YAE?
I applied your patches and got YAE to compile. How do you run YAE? I downloaded APPLET2E.ROM and DISK.ROM and tried ./apple2 -e ShadowKeep1.nib but I just get a window that says "Apple //e". The loop in main.c run running, but nothing happens. Do I need other files? thanks for any help, -m
by Unregistered Visitor on 03/20/05