#define VMAJOR 3 /* Version number */
-#define VMINOR 1
+#define VMINOR 2
;-----------------------------------------------------------------------
;
; Baudrate of serial port (console).
;#define BAUD 115200
-; I2C defaults 1 on 8-bit-ram systems and must be 0 on 4-bit-ram systems.
+; I2C_SUPPORT defaults to 1 on 8-bit-ram systems and must be 0 on 4-bit-ram systems.
; Set this do 0, if you don't have I2C peripherals and want to save some flash
; or use the I2C pins for other purposes.
-;#define I2C
+;#define I2C_SUPPORT
; Emulate Z80 cpu if 1, 8080 otherwise.
;
#define I2CADRL 0x07
#define I2CADRH 0x08
+; Simple ADC Interface
+#define ADC80 0x17
+#define ADC81 0x18
+
; Port-Expander PCF8574
#define PORT 0x80
#define PORT0 0x80
#ifndef BAUD
#define BAUD 115200 /* console baud rate */
#endif
-#ifndef I2C
- #define I2C DRAM_8BIT /* I2C requires 8 bit DRAM */
+#ifndef I2C_SUPPORT
+ #define I2C_SUPPORT DRAM_8BIT /* I2C requires 8 bit DRAM */
+#endif
+#if I2C_SUPPORT && !DRAM_8BIT
+ #error "I2C_SUPPORT requires 8 bit DRAM (DRAM_8BIT=1)!"
#endif
-#if I2C && !DRAM_8BIT
- #error "I2C requires 8 bit DRAM (DRAM_8BIT=1)!"
+#ifndef ADC_SUPPORT
+ #define ADC_SUPPORT 0
#endif
#ifndef EM_Z80
.def _WE = r5
.def _255 = r6
.def _0 = r7
-.def z_a = r9
-;.def stx_bitcount = r9
-;.def stx_dr = r10
-
-.def srx_lastedgel = r10
-.def srx_lastedgeh = r11
-;.def insstore= r8 ;
-;.def insop = r13 ;
-
-.def insdecl = r12 ;
-.def insdech = r13 ;
-.def z_spl = r14
+
+.def z_c = r8 ;
+.def z_b = r9 ;
+.def z_e = r10 ;
+.def z_d = r11 ;
+.def z_l = r12 ;
+.def z_h = r13 ;
+.def z_spl = r14 ;
.def z_sph = r15 ;
.def temp = r16 ;
.def temp2 = r17 ;
-.def temp3 = r18
-.def temp4 = r19
+.def temp3 = r18 ;
+;.def temp4 = r19 ;
+.def intstat = r19 ;interpreter status / interrupt status
.def z_flags = r20 ;
-.def intstat = r21 ; interpreter status / interrupt status
+.def z_a = r21 ;
.def opl = r22 ;
.def oph = r23 ;
.def z_pcl = r24 ;
; xh ;r27
; yl ;r28
; yh ;r29
-; zl ;r30 ;
-; zh ;r31 ;
+; zl ;r30
+; zh ;r31
.equ i_break = 0 ;break detected flag
.equ readop = 4 ;1 if read operation
.equ prefixfd = 1 ;Opcode prefix DD=0, FD=1
- .equ trace = 0
#if EM_Z80