-
SDCC files ready!
04/04/2016 at 09:55 • 0 commentsI've recovered the tree of files with the SDCC compatible firmware.
-
Ooops!
04/01/2016 at 03:23 • 0 commentsSorry, uploaded wrong files to dropbox, but removed them already.
-
Porting code to SDCC
03/31/2016 at 17:42 • 0 commentsAfter receiving feedback of Joachim from ZX81 user group that assembled the TEK I've started to porting the code to SDCC. At this time I can compile the code in SDCC running under Windows. On Linux I am still dealing with some compilation errors related to libraries but this is a matter for another log.
The porting basically required:
- Installing the necessary tools
- Changing the type of some variables to be compatible with SDCC: chars have been replaced by uint8_t to avoid warnings and int1 have been replaced by uint8_t. I've tried to use _Bool type (from stdbool.h) but this resulted in an internal SDCC error!
- Changing the way of defining the fuses
//#fuses INTRC_IO, NOPROTECT, NOBROWNOUT, NOWDT, PUT uint16_t __at _CONFIG configWord = _INTRC_OSC_NOCLKOUT & _CPD_OFF & _CP_OFF & _WDT_OFF & _PWRTE_ON;
- Replacing library functions by macros or direct accessing the registers.
// output_low (PIN_SDA); TRIS_SDA=0; //set as output PIN_SDA=0;
- Changing the delay_us funcion to reflect the time spent by the assembly code generated by the macro (it takes 4+ 9*X cycles).
#define delay_us(x) { uint8_t us; \ us = (x)*FOSC/36000000L - 4/9;\ while(--us != 0) continue; }
The SDCC compiler provides an estimate size of code generated: 669 instructions.
It is almost the same size of the code generated with CCS. The difference is minimal.
-
ZX81: Connections and Key Bindings
06/21/2015 at 02:00 • 0 commentsAdded connections for ZX81/TK85 and key bindings for PS/2 Keyboard (ABNT Standard). Will update firmware link as soon as new bindings for keyboard is set.
Further details available here.