From: jfid@mfltd.co.uk (James Fidell) Newsgroups: alt.sources Subject: xbeeb 0.1.1 patch Date: 19 Aug 1994 17:37:00 +0100 Message-ID: <332n3c$mnq@icebox.mfltd.co.uk> Appended is a diff to fix a few problems with xbeeb 0.1. See the CHANGES file for details. James. --------------------8<----- snip here -----8<-------------------- diff -c --new-file --recursive xbeeb-0.1/6502.c xbeeb-0.1.1/6502.c *** xbeeb-0.1/6502.c Thu Aug 18 13:03:40 1994 --- xbeeb-0.1.1/6502.c Fri Aug 19 09:08:29 1994 *************** *** 47,53 **** register unsigned int OperandAddress; #ifdef DISASS ! printf ( "ORA (&%2x,X)\n", *EmulatorPC )); #endif ZeroPageAddress = *EmulatorPC++ + RegisterX; #ifdef RANGE_CHECK --- 47,53 ---- register unsigned int OperandAddress; #ifdef DISASS ! printf ( "ORA (&%2x,X)\n", *EmulatorPC ); #endif ZeroPageAddress = *EmulatorPC++ + RegisterX; #ifdef RANGE_CHECK *************** *** 100,106 **** case ORA_Im : #ifdef DISASS ! printf ( "ORA #&%x\n", *EmulatorPC )); #endif Ora ( *EmulatorPC++); AddClockCycles ( 2 ); --- 100,106 ---- case ORA_Im : #ifdef DISASS ! printf ( "ORA #&%x\n", *EmulatorPC ); #endif Ora ( *EmulatorPC++); AddClockCycles ( 2 ); diff -c --new-file --recursive xbeeb-0.1/CHANGES xbeeb-0.1.1/CHANGES *** xbeeb-0.1/CHANGES Thu Jan 1 00:00:00 1970 --- xbeeb-0.1.1/CHANGES Fri Aug 19 17:24:02 1994 *************** *** 0 **** --- 1,41 ---- + Fri Aug 19 17:23:44 BST 1994 + + Released xbeeb 0.1.1 + + + Fri Aug 19 17:18:52 BST 1994 + + Sorted out a load of type mismatches in Teletext.c + + + Fri Aug 19 16:50:50 BST 1994 + + XCopyGC in Screen.c should have an unsigned long second parameter. + + + Fri Aug 19 16:48:25 BST 1994 + + Memory.c now #includes + + + Fri Aug 19 16:46:38 BST 1994 + + Provided default values for PATH_MAX and NAME_MAX in Config.h. Really + they should be sorted out from the C header files, but I'm not sure + how to do that portably yet. + + + Fri Aug 19 09:50:44 BST 1994 + + Corrected a couple of filenames in Makefile.v + + + Fri Aug 19 09:50:00 BST 1994 + + Removed a couple of extraneous parentheses from 6502.c which + prevented compilation with DISASS defined. + + + Thu Aug 18 15:19:59 BST 1994 + + Released xbeeb 0.1 diff -c --new-file --recursive xbeeb-0.1/Config.h xbeeb-0.1.1/Config.h *** xbeeb-0.1/Config.h Thu Aug 18 13:03:44 1994 --- xbeeb-0.1.1/Config.h Fri Aug 19 16:46:25 1994 *************** *** 86,88 **** --- 86,103 ---- #define OS_ROM "OS1.2.rom" #define LANG_ROM "BASIC2.rom" + + /* + * FIX ME + * + * A portable way of fixing these values is required. For now, they + * are just set to the fixed values so that the code will compile. + */ + + #ifndef PATH_MAX + #define PATH_MAX 1024 + #endif + + #ifndef NAME_MAX + #define NAME_MAX 14 + #endif diff -c --new-file --recursive xbeeb-0.1/Makefile.v xbeeb-0.1.1/Makefile.v *** xbeeb-0.1/Makefile.v Thu Aug 18 13:05:24 1994 --- xbeeb-0.1.1/Makefile.v Fri Aug 19 09:55:13 1994 *************** *** 29,37 **** # # set NETLIBS to the libraries to link for networking support (sockets etc.) # ! # NETLIBS = -lsocket -lnsl # SVR4 # NETLIBS = -lsocket # SCO ! NETLIBS = # Linux # # C compiler and C compiler options --- 29,37 ---- # # set NETLIBS to the libraries to link for networking support (sockets etc.) # ! NETLIBS = -lsocket -lnsl # SVR4 # NETLIBS = -lsocket # SCO ! # NETLIBS = # Linux # # C compiler and C compiler options *************** *** 42,49 **** # # makedepend # ! # DEPEND = makedepend # Most systems ! DEPEND = gccmakedep # Linux # # ... and a few other bits... --- 42,49 ---- # # makedepend # ! DEPEND = makedepend # Most systems ! # DEPEND = gccmakedep # Linux # # ... and a few other bits... *************** *** 59,66 **** SRCS = Beeb.c Memory.c Fred.c Jim.c Sheila.c Crtc.c Acia.c \ SerialUla.c VideoUla.c RomSelect.c SystemVia.c UserVia.c \ Floppy.c Econet.c ADC.c TubeUla.c 6522Via.c Keyboard.c \ ! Screen.c Modes.c Mode7.c Display.c \ ! Todo.c OBJS = $(SRCS:.c=.o) --- 59,65 ---- SRCS = Beeb.c Memory.c Fred.c Jim.c Sheila.c Crtc.c Acia.c \ SerialUla.c VideoUla.c RomSelect.c SystemVia.c UserVia.c \ Floppy.c Econet.c ADC.c TubeUla.c 6522Via.c Keyboard.c \ ! Screen.c Modes.c Teletext.c Display.c Sound.c OBJS = $(SRCS:.c=.o) diff -c --new-file --recursive xbeeb-0.1/Memory.c xbeeb-0.1.1/Memory.c *** xbeeb-0.1/Memory.c Thu Aug 18 13:03:49 1994 --- xbeeb-0.1.1/Memory.c Fri Aug 19 16:48:14 1994 *************** *** 24,29 **** --- 24,30 ---- #include + #include #include #include #include diff -c --new-file --recursive xbeeb-0.1/Memory.h xbeeb-0.1.1/Memory.h *** xbeeb-0.1/Memory.h Thu Aug 18 13:03:49 1994 --- xbeeb-0.1.1/Memory.h Fri Aug 19 17:05:14 1994 *************** *** 45,53 **** #else ! #define ReadWordAtPC() *(( EmulatorPC ) + 256 * ( * ( EmulatorPC + 1 ))) ! #define ReadWord(a) ( Mem [ a ] + 256 * Mem [ a + 1 ] ) ! #define WriteWord(a,v) Mem [ a ] = v & 0xff; Mem [ a + 1 ] = v >> 8 #endif /* LITTLE_ENDIAN */ --- 45,53 ---- #else ! #define ReadWordAtPC() (( *EmulatorPC ) + 256 * ( * ( EmulatorPC + 1 ))) ! #define ReadWord(a) ( Mem [ a ] + 256 * Mem [ (a) + 1 ] ) ! #define WriteWord(a,v) Mem [ a ] = (v) & 0xff; Mem [ (a) + 1 ] = (v) >> 8 #endif /* LITTLE_ENDIAN */ diff -c --new-file --recursive xbeeb-0.1/Screen.c xbeeb-0.1.1/Screen.c *** xbeeb-0.1/Screen.c Thu Aug 18 13:03:51 1994 --- xbeeb-0.1.1/Screen.c Fri Aug 19 16:50:31 1994 *************** *** 114,120 **** XMapRaised ( dpy, BeebScreen ); CursorGC = XCreateGC ( dpy, BeebScreen, None, 0 ); ! XCopyGC ( dpy, DefaultGraphicsContext, ~0L, CursorGC ); CursorGCValues.function = GXxor; CursorGCValues.foreground = White; --- 114,120 ---- XMapRaised ( dpy, BeebScreen ); CursorGC = XCreateGC ( dpy, BeebScreen, None, 0 ); ! XCopyGC ( dpy, DefaultGraphicsContext, ~(( unsigned long ) 0), CursorGC ); CursorGCValues.function = GXxor; CursorGCValues.foreground = White; diff -c --new-file --recursive xbeeb-0.1/Sheila.c xbeeb-0.1.1/Sheila.c *** xbeeb-0.1/Sheila.c Thu Aug 18 13:03:52 1994 --- xbeeb-0.1.1/Sheila.c Thu Aug 18 17:45:48 1994 *************** *** 118,126 **** */ return ReadTubeUla ( addr - 0xfee0 ); - - fprintf ( stderr, "Illegal address in ReadSheila (%x)\n", addr ); - exit ( 1 ); } --- 118,123 ---- diff -c --new-file --recursive xbeeb-0.1/Teletext.c xbeeb-0.1.1/Teletext.c *** xbeeb-0.1/Teletext.c Thu Aug 18 13:03:54 1994 --- xbeeb-0.1.1/Teletext.c Fri Aug 19 16:58:48 1994 *************** *** 39,46 **** static unsigned char FlashStatus; static unsigned char CursorOnScreen; ! static unsigned int CursorX = 255; ! static unsigned int CursorY = 255; static unsigned int CursorDepth = 255; static unsigned int CursorWidth = 255; --- 39,46 ---- static unsigned char FlashStatus; static unsigned char CursorOnScreen; ! static int CursorX = 255; ! static int CursorY = 255; static unsigned int CursorDepth = 255; static unsigned int CursorWidth = 255; *************** *** 176,182 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); CurrGC = TtextTextGC; XSetForeground ( dpy, CurrGC, c ); --- 176,182 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); CurrGC = TtextTextGC; XSetForeground ( dpy, CurrGC, c ); *************** *** 195,201 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; Flash = 0; got = 0; --- 195,201 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; Flash = 0; got = 0; *************** *** 211,217 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; Flash = FlashStatus; SeenFlash = 1; --- 211,217 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; Flash = FlashStatus; SeenFlash = 1; *************** *** 234,240 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; got = 0; goto next_char; --- 234,240 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; got = 0; goto next_char; *************** *** 256,262 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; got = 0; if ( DblHeight ) --- 256,262 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; got = 0; if ( DblHeight ) *************** *** 282,288 **** line [ got++ ] = Conceal ? ' ' : HoldCharacter; Conceal = 0; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); /* * FIX ME --- 282,288 ---- line [ got++ ] = Conceal ? ' ' : HoldCharacter; Conceal = 0; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); /* * FIX ME *************** *** 317,323 **** { Conceal = 1; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; got = 1; line [ 0 ] = ' '; --- 317,323 ---- { Conceal = 1; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; got = 1; line [ 0 ] = ' '; *************** *** 332,338 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); XSetFont ( dpy, TtextMosaicGC, TtextContiguousMosaic ); hpos += got; got = 0; --- 332,338 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); XSetFont ( dpy, TtextMosaicGC, TtextContiguousMosaic ); hpos += got; got = 0; *************** *** 347,353 **** { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); XSetFont ( dpy, TtextMosaicGC, TtextSeparateMosaic ); hpos += got; got = 0; --- 347,353 ---- { line [ got++ ] = ' '; XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); XSetFont ( dpy, TtextMosaicGC, TtextSeparateMosaic ); hpos += got; got = 0; *************** *** 367,373 **** if ( c == 156 ) { XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; got = 1; line [ 0 ] = ' '; --- 367,373 ---- if ( c == 156 ) { XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; got = 1; line [ 0 ] = ' '; *************** *** 393,399 **** if ( c == 157 ) { XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, line, got ); hpos += got; got = 1; line [ 0 ] = ' '; --- 393,399 ---- if ( c == 157 ) { XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, ! lines * 19, (char *)line, got ); hpos += got; got = 1; line [ 0 ] = ' '; *************** *** 456,462 **** } XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, lines * 19, ! line, got ); } } --- 456,462 ---- } XDrawImageString ( dpy, BeebScreen, CurrGC, hpos * 12, lines * 19, ! (char *)line, got ); } } --------------------8<----- snip here -----8<-------------------- -- "Yield to temptation -- | it may not pass your way again" | jfid@mfltd.co.uk | - Lazarus Long | James Fidell