From f1453ff2738994977ca623d953f656754d0d9a4a Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 31 Jul 2000 22:04:21 +0000 Subject: [PATCH] Changes from Maciej git-svn-id: svn://svn.cc65.org/cc65/trunk@245 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- include/geos/gconst.h | 9 +++++++-- include/geos/gstruct.h | 10 ++++++++-- include/geos/gsym.h | 18 +++++++----------- libsrc/geos/file/findftypes.s | 12 +++++++++--- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/include/geos/gconst.h b/include/geos/gconst.h index 517ee37a1..ab6d559a9 100644 --- a/include/geos/gconst.h +++ b/include/geos/gconst.h @@ -2,7 +2,7 @@ GEOS constants, 4-2-99, 18-3-99 small C version: 25-27.10.99 - reassembled by Maciej 'YTM/Alliance' Witkowiak + reassembled by Maciej 'YTM/Elysium' Witkowiak */ /* Here are constants which didn't fit into any other cathegory... */ @@ -39,6 +39,11 @@ /* offset to something */ #define OFF_INDEX_PTR 1 +/* values for CPU_DATA memory config - C64 */ +#define IO_IN 0x35 +#define KRNL_IO_IN 0x36 +#define KRNL_BAS_IO_IN 0x37 + /* values for MMU config - C128 */ #define CIOIN 0x7E #define CRAM64K 0x7F @@ -48,7 +53,7 @@ /* alarmSetFlag */ #define ALARMMASK 4 -#define CLR_SAVE 0x40 +#define CLR_SAVE 0x40 #define CONSTRAINED 0x40 #define UN_CONSTRAINED 0 #define FG_SAVE 0x80 diff --git a/include/geos/gstruct.h b/include/geos/gstruct.h index 9c79d29d3..ef25426f3 100644 --- a/include/geos/gstruct.h +++ b/include/geos/gstruct.h @@ -2,7 +2,7 @@ GEOS structs ported to small C on 25-27.10.1999 - by Maciej 'YTM/Alliance' Witkowiak + by Maciej 'YTM/Elysium' Witkowiak */ #ifndef _GSTRUCT_H @@ -113,7 +113,13 @@ struct icontab { struct icondef tab[]; /* table of size declared by icontab.number */ }; -/* everything below is obsolete and kept for unknown reasons */ +/* + structures below might be used to speed up access to own menus + e.g. if you have menu defined as TopMenu and you want to change the number of + menu items use: + ((struct menu*)&TopMenu)->number=newNumber; + This will allow cc65 to emit better code. +*/ struct menuitem { char *name; diff --git a/include/geos/gsym.h b/include/geos/gsym.h index 6dc7c5135..1a2eecf54 100644 --- a/include/geos/gsym.h +++ b/include/geos/gsym.h @@ -1,8 +1,8 @@ /* GEOS constants reassembled 4-2-99 ported to small C 26.8.99, 25-26.10.99 - Maciej 'YTM/Alliance' Witkowiak - ytm@friko.onet.pl + Maciej 'YTM/Elysium' Witkowiak + ytm@elysium.pl */ #ifndef _GSYM_H @@ -46,7 +46,7 @@ #define r7L *(char*)0x10 #define r7H *(char*)0x11 #define r8 *(unsigned int*)0x12 -#define r8L *(char*)0x12 +#define r8L *(char*)0x12 #define r8H *(char*)0x13 #define r9 *(unsigned int*)0x14 #define r9L *(char*)0x14 @@ -66,7 +66,7 @@ #define r14 *(unsigned int*)0x1e #define r14L *(char*)0x1e #define r14H *(char*)0x1f -#define r15 *(unsigned int*)0x20 +#define r15 *(unsigned int*)0x20 #define r15L *(char*)0x20 #define r15H *(char*)0x21 /* WARNING - these are used by C as temporary registers! */ @@ -86,7 +86,7 @@ #define a4L *(char*)0x74 #define a4H *(char*)0x75 #define a5 *(unsigned int*)0x76 -#define a5L *(char*)0x76 +#define a5L *(char*)0x76 #define a5H *(char*)0x77 #define a6 *(unsigned int*)0x78 #define a6L *(char*)0x78 @@ -110,9 +110,6 @@ #define RAM_64K *(char*)0x30 #define msePicPtr *(unsigned int*)0x31 #define curWindow (*(struct window*)0x33) -/*#define IO_IN *(char*)0x35 - #define KRNL_IO_IN *(char*)0x36 - #define KRNL_BAS_IO_IN *(char*)0x37*/ #define pressFlag *(char*)0x39 #define mousePos (*(struct pixel*)0x3a) #define returnAddress *(unsigned int*)0x3d @@ -126,7 +123,7 @@ #define errno *(char*)0x91 #define irqvec *(unsigned int*)0x0314 -#define bkvec *(unsigned int*)0x0316 +#define bkvec *(unsigned int*)0x0316 #define nmivec *(unsigned int*)0x0318 #define APP_RAM *(char*)0x0400 @@ -186,7 +183,7 @@ #define mouseData *(char*)0x8505 #define inputData *(char*)0x8506 #define mouseSpeed *(char*)0x8507 -#define random *(char*)0x850a +#define random *(char*)0x850a #define saveFontTab (*(struct fontdesc*)0x850c) #define dblClickCount *(char*)0x8515 @@ -299,4 +296,3 @@ #define vdcdata *(char*)0xd601 #endif - diff --git a/libsrc/geos/file/findftypes.s b/libsrc/geos/file/findftypes.s index 66e270c96..b15c3d4d1 100644 --- a/libsrc/geos/file/findftypes.s +++ b/libsrc/geos/file/findftypes.s @@ -1,8 +1,8 @@ ; -; Maciej 'YTM/Alliance' Witkowiak +; Maciej 'YTM/Elysium' Witkowiak ; -; 25.12.99 +; 25.12.99, 30.7.2000 ; char FindFTypes (char *buffer, char fileType, char fileMax, char *Class); @@ -17,6 +17,7 @@ _FindFTypes: stx r10H jsr popa sta r7H + sta tmpFileMax jsr popa sta r7L jsr popax @@ -24,5 +25,10 @@ _FindFTypes: stx r6H jsr FindFTypes stx errno - txa +; return (fileMax - r7H) + lda tmpFileMax + sec + sbc r7H rts + +tmpFileMax: .byte 0 -- 2.39.5