Search found 121 matches
- Wed Feb 14, 2024 9:03 pm
- Forum: Sinclair ZX
- Topic: How to allocate a variable in a specific memory location
- Replies: 12
- Views: 372
Re: How to allocate a variable in a specific memory location
Thank you everyone, I didn't realise it would be this complex. I'd have thought this feature was essential to anyone making a ZX spectrum game You have to remember that z88dk supports over 100 different targets, and weirdness like contended memory on one particular platform needs to be dealt with i...
- Sat Feb 10, 2024 11:45 am
- Forum: Sinclair ZX
- Topic: How to allocate a variable in a specific memory location
- Replies: 12
- Views: 372
Re: How to allocate a variable in a specific memory location
I've written a couple of games where I had this exact problem. I don't think __at() is the right way to approach it, you're asking an awful lot from a very simple feature which wasn't really designed for this. The correct way to solve the problem is to use sections. Unfortunately sections aren't eas...
- Wed Aug 16, 2023 11:03 am
- Forum: Other platforms
- Topic: Better Linux Install Experience?
- Replies: 50
- Views: 57042
Re: Better Linux Install Experience?
What are you trying to install from? What did you download and what command did you use to run the install?
- Sun Jul 02, 2023 5:17 pm
- Forum: Project Activity
- Topic: ez80-clang supported as compiler
- Replies: 4
- Views: 1837
Re: ez80-clang supported as compiler
Do you have any feeling on the speed of the generated code relative to the other two compilers?
- Sun May 07, 2023 8:36 am
- Forum: Sinclair ZX
- Topic: Using SP1 for scroller games
- Replies: 46
- Views: 17607
Re: Using SP1 for scroller games
Yes, I've moved from z88dk to other projects for a while, but I'm following along too.
- Fri Jan 06, 2023 7:43 pm
- Forum: Sinclair ZX
- Topic: Thanks for the 'ZX Spectrum getting started guide'
- Replies: 2
- Views: 1223
Re: Thanks for the 'ZX Spectrum getting started guide'
Just to confirm the updates suggested here went into the ZX Getting Started Guide earlier today. Thanks for the input, much appreciated.
- Thu Dec 29, 2022 9:57 am
- Forum: Misc
- Topic: Change BSS org address
- Replies: 1
- Views: 1570
Re: Change BSS org address
Have a look here. In particular, the CRT_ORG_BSS, CRT_ORG_DATA and CRT_ORG_CODE pragmas are what you're looking for.
- Fri Dec 02, 2022 9:02 am
- Forum: Sinclair ZX
- Topic: Thanks for the 'ZX Spectrum getting started guide'
- Replies: 2
- Views: 1223
Re: Thanks for the 'ZX Spectrum getting started guide'
I've just worked through all of the the 'ZX Spectrum getting started guide' and it was most excellent, a really useful introduction to a good range of topics. Many thanks! Thank you! You remind me, it needs a bit of a refresh to prevent too much bit rot getting in there. I'll get round to your sugg...
- Thu Oct 27, 2022 1:17 pm
- Forum: Misc
- Topic: Misc functions
- Replies: 8
- Views: 1322
Re: Misc functions
Have you seen what the compiler makes of that? An enhancement it is not...jorgegv wrote: ↑Thu Oct 27, 2022 8:44 am Just a small enhancement (a classic):Code: Select all
void swap(int *p1, int *p2) { // no temps needed *p1^=*p2; *p2^=*p1; *p1^=*p2; }
- Wed Aug 31, 2022 9:08 am
- Forum: Sinclair ZX
- Topic: change default font with FZX in nirvana
- Replies: 11
- Views: 3168
Re: change default font with FZX in nirvana
I've never used FZX and I'm not sure how much knowledge there is about it in the z88dk world.
You could try starting a new thread with an appropriate subject line and your example code so far.
You could try starting a new thread with an appropriate subject line and your example code so far.
- Sun Aug 28, 2022 8:50 am
- Forum: Sinclair ZX
- Topic: change default font with FZX in nirvana
- Replies: 11
- Views: 3168
Re: change default font with FZX in nirvana
FZX is a font engine for the Spectrum:
https://spectrumcomputing.co.uk/entry/2 ... ectrum/FZX
It's been integrated into z88dk so you can use its features from C.
As you were unaware of that I suspect it's probably not what you should be using at the moment.
https://spectrumcomputing.co.uk/entry/2 ... ectrum/FZX
It's been integrated into z88dk so you can use its features from C.
As you were unaware of that I suspect it's probably not what you should be using at the moment.
- Thu Aug 25, 2022 3:03 pm
- Forum: Sinclair ZX
- Topic: change default font with FZX in nirvana
- Replies: 11
- Views: 3168
Re: change default font with FZX in nirvana
and another question, testing without nirvana using -clib=ansi and setting #pragma define ansicolumns=42 could change the number of columns... is there a similar parameter in fzx or using -clib=sdcc_iy? What exactly are you trying to achieve? Specifying a number of columns with proportionally space...
- Sun Aug 21, 2022 3:05 pm
- Forum: Sinclair ZX
- Topic: change default font with FZX in nirvana
- Replies: 11
- Views: 3168
- Fri Aug 19, 2022 4:05 pm
- Forum: Sinclair ZX
- Topic: change default font with FZX in nirvana
- Replies: 11
- Views: 3168
Re: change default font with FZX in nirvana
The nirvana example uses printf(), and hence requires stdio. To use FZX with stdio you need to use a stdio driver which supports it. There are two of those: number 8, which enables FZX but doesn't support control codes embedded in the output string, and number 9, which enables FZX and does support e...
- Wed Jul 27, 2022 7:24 pm
- Forum: Sinclair ZX
- Topic: Why is my ROM writable code not working?
- Replies: 3
- Views: 2375
Re: Why is my ROM writable code not working?
Yes, making it my code:
fixes it for 2.2.
So the compiler is assuming that it's already got a copy of the value at 0x0000 and thinks it doesn't need to reread it. So is what it's doing valid? I think it is, isn't it? I'm not sure what the rules are...
Code: Select all
volatile uint8_t byte0 = z80_bpeek(0);
So the compiler is assuming that it's already got a copy of the value at 0x0000 and thinks it doesn't need to reread it. So is what it's doing valid? I think it is, isn't it? I'm not sure what the rules are...
- Wed Jul 27, 2022 6:25 pm
- Forum: Sinclair ZX
- Topic: Why is my ROM writable code not working?
- Replies: 3
- Views: 2375
Re: Why is my ROM writable code not working?
I just reverted to my 2.1 install which has >zsdcc -v ZSDCC IS A MODIFICATION OF SDCC FOR Z88DK Build: 4.0.7 #12036 (Linux) Nov 27 2021 That works. The generated code is 491 004E _is_rom_writable: 492 004E ;tracetable.c:58: uint8_t byte0 = z80_bpeek(0); 493 004E 21 00 00 ld hl,0x0000 494 0051 4E ld ...
- Wed Jul 27, 2022 6:17 pm
- Forum: Sinclair ZX
- Topic: Why is my ROM writable code not working?
- Replies: 3
- Views: 2375
Why is my ROM writable code not working?
I have this piece of code which checks to see if the Spectrum's ROM is writable (which on an emulator it might be): uint8_t is_rom_writable(void) { uint8_t byte0 = z80_bpeek(0); z80_bpoke( 0, ~byte0 ); if( z80_bpeek(0) == byte0 ) return 0; z80_bpoke( 0, byte0 ); return 1; } So peek the byte at 0000,...
- Tue Jul 26, 2022 5:29 pm
- Forum: Misc
- Topic: z80asm user manual disappeared from 2.2?
- Replies: 2
- Views: 1332
Re: z80asm user manual disappeared from 2.2?
Excellent, thank you!
- Tue Jul 26, 2022 10:37 am
- Forum: Misc
- Topic: z80asm user manual disappeared from 2.2?
- Replies: 2
- Views: 1332
z80asm user manual disappeared from 2.2?
In 2.1 the z80asm user manual was in doc/z80asm.txt (and the HTML equivalent). It appears to have disappeared? Where did it go?
- Mon Jul 25, 2022 9:50 am
- Forum: Announcements
- Topic: z88dk v2.2 released
- Replies: 5
- Views: 7970
Re: z88dk v2.2 released
See the comment I added to the PR.
- Sun Jul 24, 2022 10:30 am
- Forum: Announcements
- Topic: z88dk v2.2 released
- Replies: 5
- Views: 7970
Re: z88dk v2.2 released
Hmmm, I can't be the only person who went to Github, clicked the green "Code" button, then hit "Download ZIP" from the dropdown that appears. Is there any merit in putting a check in the build script to stop with an informative error if it finds the external dependency directorie...
- Sat Jul 23, 2022 4:37 pm
- Forum: Announcements
- Topic: z88dk v2.2 released
- Replies: 5
- Views: 7970
Re: z88dk v2.2 released
Struggling to build on my Ubuntu Focal box. I downloaded the z88dk-2.2.zip straight from the github site, then followed the instructions in the installation wiki page. I needed to install uthash-dev, so I think that should be added to the dependencies list? Even then it still fails to build: ccache ...
- Fri May 20, 2022 9:13 am
- Forum: Sinclair ZX
- Topic: math16 on the Spectrum
- Replies: 20
- Views: 8646
Re: math16 on the Spectrum
Yes, everything I found got fixed.
- Wed May 18, 2022 7:37 am
- Forum: Sinclair ZX
- Topic: math16 on the Spectrum
- Replies: 20
- Views: 8646
Re: math16 on the Spectrum
I'm quite interested in what the use case is, the best I can come up with is something graphically related. It was 6 months ago, but since I finally finished the project I'll fill in this blank. ;) I started with a port of the Boids algorithm, as demonstrated here . I implemented it on Linux, then ...
- Mon May 09, 2022 2:39 pm
- Forum: Sinclair ZX
- Topic: zsdcc register usage
- Replies: 8
- Views: 2731
Re: zsdcc register usage
"PUSH rr" is 11 Ts, and I need 4 of them, plus PUSH IX and PUSH IY (15 Ts each), then an EXX (4 Ts), then 3 more PUSHes for the alternate set, then another EXX... 155 Ts. Plus about the same to put everything back when the routine exists. I'm rewriting the routine in ASM because it's calle...