Search found 2375 matches
- Thu Jan 25, 2024 8:37 am
- Forum: Sinclair ZX
- Topic: ZX81 Static Variables
- Replies: 7
- Views: 537
Re: ZX81 Static Variables
It looks like it's a bit of funky initialisation behaviour - you're initialising an array incorrectly and it's being turned into a pointer. You need the curly braces, however uninitialised global variables end up in bss anyway, so you don't need to initialise them unless you really want the arrays t...
- Thu Jan 25, 2024 8:34 am
- Forum: Bug reports
- Topic: switch within switch
- Replies: 6
- Views: 660
Re: switch within switch
The nightly from today has a limit of 512 - hopefully that'll be enough!
- Thu Jan 25, 2024 8:33 am
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to play psg music on the colecovision/adam?
- Replies: 12
- Views: 717
Re: How to play psg music on the colecovision/adam?
If it's playing the example song then a step has been missed. So let's debug this - here's a walkthrough to solving the two most likely problems: First of all, remove any rom or .bin files from the directory. Recompile, is there a rom file there? If not, check that you're using the -create-app optio...
- Wed Jan 24, 2024 8:39 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to play psg music on the colecovision/adam?
- Replies: 12
- Views: 717
Re: How to play psg music on the colecovision/adam?
Okay, if we've got the PSG file life is very easy. Using examples/sound/psglib for simplicity, copy the psg file into that directory. We now need to wrap the PSG file so that we can assemble it, so create the following file - let's call it mymusic.asm: SECTION rodata_user PUBLIC _mymusic _mymusic: B...
- Wed Jan 24, 2024 4:53 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to play psg music on the colecovision/adam?
- Replies: 12
- Views: 717
Re: How to play psg music on the colecovision/adam?
The wiki page for audio is here: https://github.com/z88dk/z88dk/wiki/Classic-Audio The coleco has an SN PSG so only psglib is available. Thankfully that’s widely used by SMS devs so there’s a lot of resources available. As long as whatever tracker you use supports exporting to VGM format you can use...
- Wed Jan 24, 2024 10:45 am
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to play psg music on the colecovision/adam?
- Replies: 12
- Views: 717
Re: How to play psg music on the colecovision/adam?
As plug and play as you can get: https://github.com/z88dk/z88dk/blob/mas ... /main.c#L8
That will generate a ROM which you can then load.
That will generate a ROM which you can then load.
- Wed Jan 24, 2024 10:25 am
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to play psg music on the colecovision/adam?
- Replies: 12
- Views: 717
Re: How to play psg music on the colecovision/adam?
There's an example using PSGlib here: https://github.com/z88dk/z88dk/tree/mas ... und/psglib which seems to be the usual player for the SN chips.
I'm not sure how to get furnace to export in an appropriate format, but there's tools like mod2psg which could be used.
I'm not sure how to get furnace to export in an appropriate format, but there's tools like mod2psg which could be used.
- Wed Jan 24, 2024 9:22 am
- Forum: Bug reports
- Topic: switch within switch
- Replies: 6
- Views: 660
Re: switch within switch
Sorry, I was far too tired last night so I didn't reply. There's a limit of 256 case statements that can be pending - I'm not sure how you did it with an i4004 instruction set, but that's likely the problem. I can raise the limit, but in the mean time you can work around it by putting the second lev...
- Tue Jan 23, 2024 10:12 am
- Forum: Sinclair ZX
- Topic: ZX81 Line Editing with getchar
- Replies: 2
- Views: 442
Re: ZX81 Line Editing with getchar
fgets_cons(char *buf, size_t len) provides the ability to enter a line and erase characters.
- Sat Jan 20, 2024 10:45 pm
- Forum: Sinclair ZX
- Topic: sp1 in contended memory
- Replies: 2
- Views: 549
Re: sp1 in contended memory
From that code_threads_mutex at the bottom I think you're using newlib? The section order is defined by target/crt_memory_model_z80.inc, there's this bit in there: section code_driver section code_font section code_clib include "../../clib_code.inc" section code_lib section code_compiler T...
- Sat Jan 20, 2024 10:37 pm
- Forum: Misc
- Topic: Multi-Dimensional array declaration not compiling anymore
- Replies: 2
- Views: 531
Re: Multi-Dimensional array declaration not compiling anymore
I can't pinpoint when the change happened, but it's actually consistent with other compilers: dom@ermintrude z88dk % zcc +test arr.c -compiler=sccz80 arr.c:1:40: fatal error: Must specify array dimension of type: const unsigned char [] Compilation aborted dom@ermintrude z88dk % zcc +test arr.c -comp...
- Thu Jan 18, 2024 9:50 pm
- Forum: Announcements
- Topic: z88dk v2.3 released
- Replies: 9
- Views: 5756
Re: z88dk v2.3 released
The compilers and libraries only support z80 mode, however access to more than 64k of data is available using either named address spaces or __far pointers. As a result +agon binaries are, as indicated on the wiki, ADL=0 compilations. Both the assembler (z88dk-z80asm) and disassembler (z88dk-dis) su...
- Tue Jan 16, 2024 11:18 pm
- Forum: Sinclair ZX
- Topic: +zx screen printing
- Replies: 1
- Views: 525
Re: +zx screen printing
[I've split this off since this from the previous topic since this about +zx rather than +zx81] It looks like you're using VT52 escape sequences but compiling using the VT100 driver. If you compile with: zcc +zx [file.c] -lndos and make one small change indicated below (removing the commas) it will ...
- Tue Jan 16, 2024 11:05 am
- Forum: Sinclair ZX
- Topic: +zx81 Noob Question About Libraries
- Replies: 19
- Views: 2361
Re: Noob Question About Libraries
You'll have to join all the pieces together yourself, but some pointers: z88dk/classic has an sdcard library originally used for +osca: https://github.com/z88dk/z88dk/tree/master/libsrc/sdcard @feilipu has a bunch of libraries which are worth looking at: https://github.com/feilipu/z88dk-libraries/tr...
- Sun Jan 14, 2024 9:16 pm
- Forum: Sinclair ZX
- Topic: Help with variadic function / va_list
- Replies: 2
- Views: 566
Re: Help with variadic function / va_list
sdcc is sane in va-args handling so you don't need to worry about too much. However, try this:
It looks like variadic arguments aren't packed onto the stack
Code: Select all
text_token_print( (uint8_t) va_arg(ptr, uint16_t) );
- Sat Jan 13, 2024 9:22 pm
- Forum: Other targets
- Topic: NABU Computer Support
- Replies: 94
- Views: 557869
Re: NABU Computer Support
It just means that getk() and fgetc_cons() now use the key captured via the interrupt rather than call into BDOS to get the keypressproductiondave wrote: ↑Fri Jan 12, 2024 11:21 amWhat impact does nabu_int have on the keyboard? How should I test for a keypress - and if pressed, read the key - in a gameloop?
- Fri Jan 12, 2024 11:07 am
- Forum: Other targets
- Topic: NABU Computer Support
- Replies: 94
- Views: 557869
Re: NABU Computer Support
You'll need to compile with -lnabu_int - because we override the interrupt handlers the keyboard code is kept in a separate library to avoid issues in the case you don't need extra features and just want to use BDOS calls.
- Wed Jan 10, 2024 9:41 am
- Forum: Sinclair ZX
- Topic: No output from ZCC
- Replies: 10
- Views: 1836
Re: No output from ZCC
Hmmm, that's not good - did I not capture the test case correctly? - https://github.com/z88dk/z88dk/commit/5 ... 8b42e7e80f
- Wed Jan 10, 2024 9:34 am
- Forum: Other targets
- Topic: Unexpected wrong overflow warning with SDCC
- Replies: 3
- Views: 636
Re: Unexpected wrong overflow warning with SDCC
I think this is one of these: https://sourceforge.net/p/sdcc/bugs/3094/
- Thu Dec 21, 2023 5:57 pm
- Forum: Sinclair ZX
- Topic: Assembly code view
- Replies: 7
- Views: 1435
Re: Assembly code view
So sccz80 works on the principal of having a primary register, and so tends to grab things into the primary register, then realises it needs to do something else, pushes the value on the stack and then gets it back. The support routines (i.e. the l_ routines that implement, for example multiplicatio...
- Thu Dec 21, 2023 9:02 am
- Forum: Sinclair ZX
- Topic: +zx81 Noob Question About Libraries
- Replies: 19
- Views: 2361
Re: Noob Question About Libraries
I can see ldiv in stdlib.h. Where would I find lrem and hmul? I've not come across lrem() before, but based on the name, you'd get take the rem field out of ldiv*_t structure after a call to ldiv*() The name hmul() suggests a half-float multiplication, in which case see here: https://github.com/z88...
- Wed Dec 20, 2023 8:50 pm
- Forum: Sinclair ZX
- Topic: Maybe noon, maybe wrong place but...
- Replies: 1
- Views: 1450
Re: Maybe noon, maybe wrong place but...
Apologies, I missed this one.
The best place to ask is probably over on the specnext fb group
The best place to ask is probably over on the specnext fb group
- Wed Dec 20, 2023 11:26 am
- Forum: Announcements
- Topic: z88dk v2.3 released
- Replies: 9
- Views: 5756
z88dk v2.3 released
I've uploaded a 2.3 release snapshot, this is just a copy of the 20231220 nightly. As ever, there's a large number of changes, the headline items are: * z88dk now supports ez80, r800, r4k, r5k, kc160 processors * New video drivers: V9938, Tektronix, Regis * New fixed point Q8.8 maths library * Upgra...
- Wed Dec 20, 2023 9:26 am
- Forum: Sinclair ZX
- Topic: +zx81 Noob Question About Libraries
- Replies: 19
- Views: 2361
Re: Noob Question About Libraries
The ZX81 is one of the more complicated targets of course! All targets have access to a standard library - with elements of most standards + some custom functions + BSDisms as well. We tend to create one library per target which contains all the functionality for that target. The exceptions to this ...
- Mon Dec 18, 2023 9:02 pm
- Forum: Sinclair ZX
- Topic: No output from ZCC
- Replies: 10
- Views: 1836
Re: No output from ZCC
I now understand it, and I'd still like to change it. But, I've been promising a release snapshot for most of this year so I've gone with the tentative fix.
If you don't mind grabbing a nightly/rebuilding sccz80 and could verify that it's working for you that would be great.
If you don't mind grabbing a nightly/rebuilding sccz80 and could verify that it's working for you that would be great.