From - Wed Aug 7 08:35:19 1996 Received: from pelleas.netcom.net.uk (pelleas.netcom.net.uk [194.42.224.145]) by horten.vingmed.no (8.6.9/8.6.9) with ESMTP id RAA26480 for ; Tue, 6 Aug 1996 17:22:33 +0200 Received: (from majordom@localhost) by pelleas.netcom.net.uk (8.7.4/8.7.3) id QAA24905 for xbeeb-outgoing; Tue, 6 Aug 1996 16:21:09 +0100 (BST) Received: from gatekeeper.corp.netcom.net.uk (firewall-user@gatekeeper.corp.netcom.net.uk [194.42.224.25]) by pelleas.netcom.net.uk (8.7.4/8.7.3) with SMTP id QAA24880 for ; Tue, 6 Aug 1996 16:21:06 +0100 (BST) Received: by gatekeeper.corp.netcom.net.uk; id QAA20700; Tue, 6 Aug 1996 16:21:04 +0100 Received: from Netcom by gatekeeper.corp.netcom.net.uk via smap (V3.1) id xma020677; Tue, 6 Aug 96 16:20:33 +0100 From: James Fidell Message-Id: <199608061520.QAA03215@corp.netcom.net.uk> Subject: [Xbeeb] patch-0.3.2 To: xbeeb@netcom.net.uk Date: Tue, 6 Aug 1996 16:20:31 +0100 (BST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-xbeeb@netcom.net.uk Precedence: bulk X-UIDL: f2aea8f2460656a0984572357b6e6639 Status: RO X-Mozilla-Status: 0001 diff -r -c xbeeb-0.3.1/doc/Changes xbeeb-0.3.2/doc/Changes *** xbeeb-0.3.1/doc/Changes Mon Mar 18 22:40:21 1996 --- xbeeb-0.3.2/doc/Changes Mon Mar 18 22:51:43 1996 *************** *** 448,457 **** of the target filename array in the Copy* functions. ! * Xbeeb v0.3 released. o Sat Mar 2 20:37:59 GMT 1996 Corrected the handling of 0x82, 0xc2 and 0xe2 opcodes -- these are NOPs on my 6502 -- the don't cause the processor to jam like the other HALT instructions. --- 448,475 ---- of the target filename array in the Copy* functions. ! ********************************************** ! * Xbeeb v0.3 released. * ! ********************************************** ! o Sat Mar 2 20:37:59 GMT 1996 Corrected the handling of 0x82, 0xc2 and 0xe2 opcodes -- these are NOPs on my 6502 -- the don't cause the processor to jam like the other HALT instructions. + + Patch created for v0.3.1 + + + o Thu Mar 14 22:45:42 GMT 1996 + + Numerous corrections for timer-handling/VIA emulation problems. + + + o Mon Mar 18 22:50:45 GMT 1996 + + Corrections for number of cycles in branch instructions when the + condition is true. + + Patch created for v0.3.2 diff -r -c xbeeb-0.3.1/src/6502.h xbeeb-0.3.2/src/6502.h *** xbeeb-0.3.1/src/6502.h Mon Mar 18 22:39:55 1996 --- xbeeb-0.3.2/src/6502.h Mon Mar 18 00:11:35 1996 *************** *** 104,120 **** #define CLK_ZP_READ 3 /* Read from ZP */ #define CLK_ZP_WRITE 3 /* Write to ZP */ #define CLK_ABS_JMP 3 /* Read JMP from absolute addr. */ #define CLK_STACK_PULL 4 /* Pull off stack */ - #define CLK_REL_OK 4 /* Branch to same page */ #define CLK_ZPI_READ 4 /* Read from ZP,[XY] */ #define CLK_ZPI_WRITE 4 /* Write to ZP,[XY] */ #define CLK_ABS_READ 4 /* Read from Absolute address */ #define CLK_ABS_WRITE 4 /* Write to Absolute address */ #define CLK_ABI_READ 4 /* Read from Abs,[XY] */ /* (no cross of page boundary) */ - #define CLK_REL_PAGECROSS 5 /* Branch to different page */ #define CLK_ZP_READ_MOD_WRITE 5 /* Read-Modify-Write ZP */ #define CLK_ABI_WRITE 5 /* Write to Abs,[XY] */ #define CLK_ABS_INDIRECT 5 /* Absolute indirect (JMP only) */ --- 104,120 ---- #define CLK_ZP_READ 3 /* Read from ZP */ #define CLK_ZP_WRITE 3 /* Write to ZP */ #define CLK_ABS_JMP 3 /* Read JMP from absolute addr. */ + #define CLK_REL_OK 3 /* Branch to same page */ #define CLK_STACK_PULL 4 /* Pull off stack */ #define CLK_ZPI_READ 4 /* Read from ZP,[XY] */ #define CLK_ZPI_WRITE 4 /* Write to ZP,[XY] */ + #define CLK_REL_PAGECROSS 4 /* Branch to different page */ #define CLK_ABS_READ 4 /* Read from Absolute address */ #define CLK_ABS_WRITE 4 /* Write to Absolute address */ #define CLK_ABI_READ 4 /* Read from Abs,[XY] */ /* (no cross of page boundary) */ #define CLK_ZP_READ_MOD_WRITE 5 /* Read-Modify-Write ZP */ #define CLK_ABI_WRITE 5 /* Write to Abs,[XY] */ #define CLK_ABS_INDIRECT 5 /* Absolute indirect (JMP only) */ diff -r -c xbeeb-0.3.1/src/6522Via.c xbeeb-0.3.2/src/6522Via.c *** xbeeb-0.3.1/src/6522Via.c Mon Mar 18 22:39:55 1996 --- xbeeb-0.3.2/src/6522Via.c Thu Mar 14 22:30:53 1996 *************** *** 175,185 **** /* * In continuous mode, we also need to re-load the counter ! * latches. */ if ( SystemViaTimer1Continuous ) SystemViaTimer1 += (SystemVia[T1LL] + 256 * SystemVia[T1LH]); /* * And generate the interrupt if we can. --- 175,187 ---- /* * In continuous mode, we also need to re-load the counter ! * latches, otherwise just roll the counter over */ if ( SystemViaTimer1Continuous ) SystemViaTimer1 += (SystemVia[T1LL] + 256 * SystemVia[T1LH]); + else + SystemViaTimer1 &= 0xffff; /* * And generate the interrupt if we can. *************** *** 201,210 **** if ( !SystemViaTimer2PulseCount ) { SystemViaTimer2 -= val; ! if ( SystemViaTimer2InterruptEnable && SystemViaTimer2 <= 0 ) { ! SystemViaSetInterrupt ( INT_T2 ); ! SystemViaTimer2InterruptEnable = 0; } } --- 203,229 ---- if ( !SystemViaTimer2PulseCount ) { SystemViaTimer2 -= val; ! if ( SystemViaTimer2 <= 0 ) { ! if ( SystemViaTimer2InterruptEnable ) ! { ! /* ! * FIX ME ! * ! * David Stacey commented this next line out to get ! * Firetrack working. I really need to look into that ! * a little more. ! */ ! ! SystemViaSetInterrupt ( INT_T2 ); ! SystemViaTimer2InterruptEnable = 0; ! } ! ! /* ! * roll the counter over ! */ ! ! SystemViaTimer2 &= 0xffff; } } *************** *** 240,250 **** /* * In continuous mode, we also need to re-load the counter ! * latches. */ if ( UserViaTimer1Continuous ) UserViaTimer1 += (UserVia[T1LL] + 256 * UserVia[T1LH]); /* * And generate the interrupt --- 259,271 ---- /* * In continuous mode, we also need to re-load the counter ! * latches, otherwise just roll the counter over. */ if ( UserViaTimer1Continuous ) UserViaTimer1 += (UserVia[T1LL] + 256 * UserVia[T1LH]); + else + UserViaTimer1 &= 0xffff; /* * And generate the interrupt *************** *** 266,275 **** if ( !UserViaTimer2PulseCount ) { UserViaTimer2 -= val; ! if ( UserViaTimer2InterruptEnable && UserViaTimer2 <= 0 ) { ! UserViaSetInterrupt ( INT_T2 ); ! UserViaTimer2InterruptEnable = 0; } } --- 287,305 ---- if ( !UserViaTimer2PulseCount ) { UserViaTimer2 -= val; ! if ( UserViaTimer2 <= 0 ) { ! if ( UserViaTimer2InterruptEnable ) ! { ! UserViaSetInterrupt ( INT_T2 ); ! UserViaTimer2InterruptEnable = 0; ! } ! ! /* ! * Now roll over the counter. ! */ ! ! UserViaTimer2 &= 0xffff; } } diff -r -c xbeeb-0.3.1/src/Patchlevel.h xbeeb-0.3.2/src/Patchlevel.h *** xbeeb-0.3.1/src/Patchlevel.h Mon Mar 18 22:40:22 1996 --- xbeeb-0.3.2/src/Patchlevel.h Mon Mar 18 22:39:38 1996 *************** *** 28,33 **** #define VERSION 0 #define RELEASE 3 ! #define PATCHLEVEL 1 #endif /* PATCHLEVEL_H */ --- 28,33 ---- #define VERSION 0 #define RELEASE 3 ! #define PATCHLEVEL 2 #endif /* PATCHLEVEL_H */ diff -r -c xbeeb-0.3.1/src/UserVia.c xbeeb-0.3.2/src/UserVia.c *** xbeeb-0.3.1/src/UserVia.c Mon Mar 18 22:39:55 1996 --- xbeeb-0.3.2/src/UserVia.c Thu Mar 14 22:54:42 1996 *************** *** 389,395 **** UserViaPortBPinLevel = ~val & DEF_LOGIC; UserViaPortBPinLevel |= ( val & UserVia [ ORB ] ); #ifdef INFO ! printf ( "System VIA DDRB = %02x\n", val ); #endif return; break; --- 389,395 ---- UserViaPortBPinLevel = ~val & DEF_LOGIC; UserViaPortBPinLevel |= ( val & UserVia [ ORB ] ); #ifdef INFO ! printf ( "User VIA DDRB = %02x\n", val ); #endif return; break; *************** *** 407,413 **** UserViaPortAPinLevel = ~val & DEF_LOGIC; UserViaPortAPinLevel |= ( val & UserVia [ ORA ] ); #ifdef INFO ! printf ( "System VIA DDRA = %02x\n", val ); #endif return; break; --- 407,413 ---- UserViaPortAPinLevel = ~val & DEF_LOGIC; UserViaPortAPinLevel |= ( val & UserVia [ ORA ] ); #ifdef INFO ! printf ( "User VIA DDRA = %02x\n", val ); #endif return; break;