Search found 47 matches

by einar
Sat Apr 02, 2016 2:24 pm
Forum: Feature Requests
Topic: BIFROST*2 interface library
Replies: 5
Views: 9774

Thank you!!!
by einar
Fri Apr 01, 2016 5:04 pm
Forum: Feature Requests
Topic: BIFROST*2 interface library
Replies: 5
Views: 9774

OK, thanks!
by einar
Fri Apr 01, 2016 1:18 am
Forum: Feature Requests
Topic: BIFROST*2 interface library
Replies: 5
Views: 9774

BIFROST*2 interface library

I just finished implementing a BIFROST*2 interface library for z88dk. It's available for download from directory "_Z88DK" here:

https://www.dropbox.com/sh/bgtoq6tdwrop ... 6dLJZfGASa

Could you please incorporate it into the z88dk repository? Thanks!
by einar
Mon Mar 14, 2016 1:59 pm
Forum: Sinclair ZX
Topic: Choosing CRT
Replies: 3
Views: 5125

Thanks a lot for the info!
by einar
Fri Mar 11, 2016 7:50 pm
Forum: Sinclair ZX
Topic: Choosing CRT
Replies: 3
Views: 5125

Choosing CRT

Properly choosing compile parameter "-startup" is very important to minimize program size. This parameter chooses CRT, which means memory model and devices attached to stdin, stdout, stderr. According to wiki page http://www.z88dk.org/wiki/doku.php?id=temp:front and thread http://www.z88dk...
by einar
Sat Mar 05, 2016 1:49 am
Forum: Bug reports
Topic: Incorrect colors
Replies: 3
Views: 5747

Thanks!
by einar
Fri Mar 04, 2016 12:40 pm
Forum: Bug reports
Topic: Incorrect colors
Replies: 3
Views: 5747

Further testing indicates the mask to set PAPER (while preserving INK) is probably wrong. It's supposed to reset attribute bits 3,4,5 only, but it's apparently resetting bit 2 too.
by einar
Fri Mar 04, 2016 12:21 pm
Forum: Bug reports
Topic: Incorrect colors
Replies: 3
Views: 5747

Incorrect colors

Take this test program: #include <stdio.h> #include <arch/zx.h> #define printInk(k) printf("\x10%c", (k)) #define printPaper(k) printf("\x11%c", (k)) #define printAt(row, col) printf("\x16%c%c", (col), (row)) main() { zx_border(0); zx_cls(0); printInk(0); /* black */ pr...
by einar
Wed Mar 02, 2016 6:41 pm
Forum: Bug reports
Topic: Incorrect PRINTAT definition
Replies: 2
Views: 4844

Thanks!
by einar
Wed Mar 02, 2016 6:39 pm
Forum: Bug reports
Topic: intrinsic_halt not defined
Replies: 2
Views: 4721

Thanks!
by einar
Tue Mar 01, 2016 8:41 pm
Forum: Bug reports
Topic: Incorrect PRINTAT definition
Replies: 2
Views: 4844

Incorrect PRINTAT definition

Sample file "z88dk/libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_nirvanap/nirvanadem.c" contains the following definition: #define printAt(row, col) printf("\x16%c%c", col<<1, row) Sample file "z88dk/libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_nirvanam/nirvanadem.c" contains the follow...
by einar
Tue Mar 01, 2016 8:26 pm
Forum: Bug reports
Topic: intrinsic_halt not defined
Replies: 2
Views: 4721

intrinsic_halt not defined

When I try to compile example file "z88dk/libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_nirvanap/nirvanadem.c" (from latest z88dk distribution), I get the following error: > zcc +zx -vn -startup=1 -clib=new nirvanadem.c btile.asm -o nirvanadem Key to filenames: s7p8_.o = nirvanadem.c s7p8_1.o = bti...
by einar
Fri Jan 29, 2016 8:26 pm
Forum: Bug reports
Topic: Incorrect define
Replies: 2
Views: 4680

Thanks!
by einar
Fri Jan 29, 2016 3:17 pm
Forum: Bug reports
Topic: Incorrect define
Replies: 2
Views: 4680

Incorrect define

File "nirvana-.h" revision 1.2 line 198 has an incorrect define (missing function name). Please take a look!
by einar
Fri Jan 22, 2016 4:42 pm
Forum: Announcements
Topic: z88dk v1.99A Released
Replies: 9
Views: 20474

I improved ZX7 documentation again. There are now more detailed technical notes describing the algorithm behavior in terms of a more generic sliding window size w<n (although ZX7 implementation uses a fixed sliding window size). This information will be more useful for people that care about the the...
by einar
Wed Jan 13, 2016 9:50 pm
Forum: Announcements
Topic: z88dk v1.99A Released
Replies: 9
Views: 20474

Thanks!
by einar
Wed Jan 06, 2016 12:14 pm
Forum: Announcements
Topic: z88dk v1.99A Released
Replies: 9
Views: 20474

... and I just realized a mistake I made in the documentation. Fixed now, can you please update it again?

Sorry!!!
by einar
Wed Jan 06, 2016 3:33 am
Forum: Announcements
Topic: z88dk v1.99A Released
Replies: 9
Views: 20474

BTW latest version is available from here, as usual:

https://www.dropbox.com/sh/bgtoq6tdwrop ... 6dLJZfGASa
by einar
Wed Jan 06, 2016 3:22 am
Forum: Announcements
Topic: z88dk v1.99A Released
Replies: 9
Views: 20474

I updated ZX7 documentation to add some extra information. Could you please update file "zx7.txt" in z88dk repository? Thank you!
by einar
Thu Dec 17, 2015 4:20 pm
Forum: Sinclair ZX
Topic: Compile options to optimize program size?
Replies: 12
Views: 13081

I reimplemented most of this game logic in optimized Assembly, for comparison. I just left the main execution flow coded in high level language, because I'm going to add more features now, so there's no point optimizing code that will be changed soon. This new, mostly optimized Assembly version now ...
by einar
Wed Dec 16, 2015 7:38 pm
Forum: Sinclair ZX
Topic: Suggested optimizations
Replies: 3
Views: 4936

Yet another sample program test.c : unsigned char counter = 7; void func() { counter = 11; } main() { func(); } Now generated code for function func() is as follows: ._func ld hl,11 % 256 ;const ld a,l ld (_counter),a ret Comment: 1.) When assigning a constant expression to a variable, it would be m...
by einar
Wed Dec 16, 2015 7:23 pm
Forum: Sinclair ZX
Topic: Suggested optimizations
Replies: 3
Views: 4936

Another sample program test.c : unsigned char counter = 7; void func(unsigned char i) { if (i == 1) ++counter; if (i == 2) --counter; } main() { func(0); } This time, generated code for function func() was worse: ld hl,2 ;const add hl,sp ld a,(hl) ; A = i; cp #(1 % 256) ; if (i == 1) jp nz,i_4 ld hl...
by einar
Wed Dec 16, 2015 7:12 pm
Forum: Sinclair ZX
Topic: Suggested optimizations
Replies: 3
Views: 4936

Suggested optimizations

Sample program test.c : unsigned char counter = 7; void func(unsigned char i) { if (i == 1) counter++; if (i == 2) counter--; } main() { func(0); } Compile options: zcc +zx -vn -startup=31 -clib=new test.c -O3 -a The following code will be generated by z88dk-win32-20151215.zip for function func() : ...
by einar
Wed Dec 16, 2015 6:50 pm
Forum: Sinclair ZX
Topic: Compile options to optimize program size?
Replies: 12
Views: 13081

Thanks for your detailed tips! I will try sdcc later.

In the meantime, I checked the compiled code and noticed a few oportunities for optimizations. I will start separate threads to report my findings.
by einar
Wed Dec 16, 2015 11:43 am
Forum: Sinclair ZX
Topic: Compile options to optimize program size?
Replies: 12
Views: 13081

Adding "-Cl--split-bin" to the compile line produces the following files: 1 game_BSS.bin 30 game_bss_compiler.bin 2 game_bss_error.bin 2 game_bss_stdlib.bin 3 game_CODE.bin 36 game_code_arch.bin 13 game_code_bifrost_h.bin 2,332 game_code_compiler.bin 118 game_code_compress_zx7.bin 3 game_c...