Search found 2356 matches
- Sat Mar 16, 2024 10:58 pm
- Forum: Sinclair ZX
- Topic: Bank 7 corruption while loading in Plus2A mode
- Replies: 7
- Views: 212
Re: Bank 7 corruption while loading in Plus2A mode
Ooo, that's quite nasty. Looking at the disassembly the ROM0, ROM1 and ROM2 interrupt routines don't check the bit. I'm guessing that ROM1 (syntax) is visited for the LOAD command to determine whether to load from disc or tape, before heading back to ROM3 to load via tape. Furthermore, I suspect all...
- Sat Mar 16, 2024 9:45 pm
- Forum: Other platforms
- Topic: nightly.z88dk.org not online
- Replies: 1
- Views: 31
Re: nightly.z88dk.org not online
Sorry, back up now.
- Sat Mar 16, 2024 1:23 pm
- Forum: Sinclair ZX
- Topic: Strange Malloc Problem
- Replies: 1
- Views: 28
Re: Strange Malloc Problem
Try here: https://github.com/z88dk/z88dk/wiki/Cla ... ry-mallochI would appreciate any clues on how I messed up
Note that some of those initialisation methods have been added in the past week or so. For the version you're on -DAMALLOC is the answer.
- Thu Mar 14, 2024 9:05 am
- Forum: Sinclair ZX
- Topic: Compiler auxiliary functions above $C000
- Replies: 3
- Views: 48
Re: Compiler auxiliary functions above $C000
That's always a good one to debug. If there's any missing sections can you let me know and I'll make sure they're added. Regarding order, I ran into similar issues in classic a few years ago when adding banking support and to a certain extent when dealing with those targets that page in the display ...
- Tue Mar 12, 2024 9:34 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M Plus memory management
- Replies: 4
- Views: 82
Re: CP/M Plus memory management
Oh, and I agree with the large stack space. Unless your call stack has a lot of local vars does 25% make sense? Since 25% is a bit of a floating number it's hard to say! I think when it was added we weren't really thinking about CP/M with a 60k TPA - there's always been a programmatic way to setup ...
- Mon Mar 11, 2024 9:54 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M Plus memory management
- Replies: 4
- Views: 82
Re: CP/M Plus memory management
It looks like the heap allocates from the top down which explains the number you're getting. In terms of heap sizing and location, I went through all targets and cleaned up their CRTs and in the progress added in a few pragmas to make things a bit more flexible. Screenshot 2024-03-11 at 21.45.52.png...
- Mon Mar 04, 2024 9:30 pm
- Forum: CP/M, FLOS and OS related
- Topic: Any type of file IO causes errors with submit.com
- Replies: 2
- Views: 137
Re: Any type of file IO causes errors with submit.com
For archive purposes this one is now fixed. The issue was that we didn't bother to set sp on entry to the program. On CP/M 2.2 this is okay, since sp floats somewhere below the bdos address. However on CP/M 3, sp on entry is some temporary workspace in high memory, so we end up overwriting bits of C...
- Tue Feb 27, 2024 9:32 pm
- Forum: Sinclair ZX
- Topic: Bank 7 corruption while loading in Plus2A mode
- Replies: 7
- Views: 212
Re: Bank 7 corruption while loading in Plus2A mode
BTW, I was thinking: should this be added to the banked loader routine in CRT? I have checked and there is no provision for this, meaning that anyone who uses BANK7 up to address $E600 will get corrupted data at that address when loading in +2A/+3 machines, right? Good point, I've added it in to th...
- Tue Feb 27, 2024 10:21 am
- Forum: Sinclair ZX
- Topic: Bank 7 corruption while loading in Plus2A mode
- Replies: 7
- Views: 212
Re: Bank 7 corruption while loading in Plus2A mode
See the disassembly here: https://github.com/ZXSpectrumVault/rom- ... .asm#L9212
Poking iy+1 should skip that check and prevent the corruption.
Poking iy+1 should skip that check and prevent the corruption.
- Tue Feb 27, 2024 6:42 am
- Forum: Sinclair ZX
- Topic: Bank 7 corruption while loading in Plus2A mode
- Replies: 7
- Views: 212
Re: Bank 7 corruption while loading in Plus2A mode
From memory the interrupt does some stuff up in page 7 - there’s a timer to turn off the disk motor.
Does loading in spectrum mode solve it?
Does loading in spectrum mode solve it?
- Thu Feb 22, 2024 12:27 pm
- Forum: Sinclair ZX
- Topic: +zx81 Noob Question About Libraries
- Replies: 16
- Views: 2177
Re: +zx81 Noob Question About Libraries
Unfortunately it uses the af' register for add, multiply and polynomial expansion so that's a no.
fix16 looks like it's good though.
- Thu Feb 22, 2024 12:22 pm
- Forum: Misc
- Topic: switch jump table?
- Replies: 6
- Views: 173
Re: switch jump table?
For a large switch both mechanisms we use (the cp/jp as used for uint8_t and the value/address map used for other types) is not at all efficient. I'm not sure of the number of case statements where a binary search mechanism becomes more efficient - I'm guessing it might be around about 30 case state...
- Mon Feb 19, 2024 6:56 pm
- Forum: Sinclair ZX
- Topic: __bss_compiler_head
- Replies: 1
- Views: 91
Re: __bss_compiler_head
I have a feeling that you might have too much uninitialised static data - 28k seems like quite a lot for a +zx bss_compiler will be from your code (and maybe a few bytes from some library routines depending on what you're using), the crt itself might use about a couple of hundred bytes depending on ...
- Mon Feb 19, 2024 6:50 pm
- Forum: Other platforms
- Topic: Nightly build URL not responding!?
- Replies: 6
- Views: 5889
Re: Nightly build URL not responding!?
Sorry, for some reason the proxy VM keeps dropping off the network and leaves nothing in the logs to indicate why. My suspicion is that something on my network doesn't like VLANs (I've got a couple of other problems) but nothing concrete yet, Anyway, if it happens again let me know and I'll give it ...
- Mon Feb 19, 2024 6:45 pm
- Forum: CP/M, FLOS and OS related
- Topic: Custom CPM target | Z80-Retro!
- Replies: 2
- Views: 97
Re: Custom CPM target | Z80-Retro!
When you set has_skew in the table, you also need to write a list of the sector orders - that might explain why your directory listing is off. Alternatively don't bother with skew and use a container - the skew is most useful for the raw images. By default, the CP/M target uses BDOS to handle std* s...
- Sat Feb 17, 2024 7:45 pm
- Forum: Misc
- Topic: Recommendation for declaring constants
- Replies: 6
- Views: 144
Re: Recommendation for declaring constants
It's the same pattern - we use this one in the library to pass link time values from the crt to the library. The generated code is the same as my previous example. ; Assembler file PUBLIC _SCRM_TEXT1 defc _SCRM_TEXT1 = 0x1000 // C file extern void screenmode(int); extern void *SCRM_TEXT1; #define SC...
- Fri Feb 16, 2024 8:40 pm
- Forum: Misc
- Topic: Recommendation for declaring constants
- Replies: 6
- Views: 144
Re: Recommendation for declaring constants
My preferred way is #define or enums, but you can achieve what you want this way:
And several permutations of similar ideas.
Code: Select all
extern __at(0x1000) int SCRM_TEXT1;
extern void screenmode(int);
void func()
{
screenmode((int)&SCRM_TEXT1);
}
- Mon Feb 12, 2024 10:13 am
- Forum: Sinclair ZX
- Topic: How to allocate a variable in a specific memory location
- Replies: 12
- Views: 275
Re: How to allocate a variable in a specific memory location
Actually looking through the crt, there's an easier way if you just want data to go in there and not worry about the address of the data. When the org is < 32768 a section called CONTENDED is created. So, simply put all data into CONTENDED (using the #pragma method above) The startup will be at what...
- Sun Feb 11, 2024 9:51 am
- Forum: Other targets
- Topic: NABU Computer Support
- Replies: 94
- Views: 554904
Re: NABU Computer Support
I've now exported the following functions: extern void __LIB__ nabu_set_interrupt(int enabled) __z88dk_fastcall; extern uint8_t __LIB__ nabu_set_interrupts(void); extern void __LIB__ nabu_enable_interrupt(uint8_t flags) __z88dk_fastcall; extern void __LIB__ nabu_disable_interrupt(uint8_t flags) __z8...
- Sat Feb 10, 2024 5:44 pm
- Forum: Other targets
- Topic: NABU Computer Support
- Replies: 94
- Views: 554904
Re: NABU Computer Support
Hmmm. It’s a bit of a sledgehammer but there’s a nabu_set_interrupt in arch/nabu.h so you could disable the VDP interrupt.
There’s also uint8_t nabu_get_interrupt() which isn’t in the header yet.
There’s also uint8_t nabu_get_interrupt() which isn’t in the header yet.
- Fri Feb 09, 2024 7:59 pm
- Forum: Sinclair ZX
- Topic: CP/M on the Spectrum: current library status
- Replies: 2
- Views: 144
Re: CP/M on the Spectrum: current library status
The other CP/M versions will require a parallel library build. The graphics code must stay in behind $8000 (I guess). I guess this is a parallel of the high memory graphics we have to do for some targets. Best thing to do here is to move code_graphics to earlier in the map if an option is set and t...
- Fri Feb 09, 2024 7:18 pm
- Forum: Sinclair ZX
- Topic: How to allocate a variable in a specific memory location
- Replies: 12
- Views: 275
Re: How to allocate a variable in a specific memory location
This is the first I've heard of someone wanting to place data at a particular address, the original intention behind the __at() syntax was I believe for access to system variables or data already existing in memory. However, it does look like data can be initialised and this should answer the questi...
- Wed Feb 07, 2024 10:09 pm
- Forum: Sinclair ZX
- Topic: ZX81 Static Variables
- Replies: 7
- Views: 454
Re: ZX81 Static Variables
Can I ask then, is static void *sp[MAXSTACK] = {0}; a valid way to declare an ARRAY OF VOID POINTERS? If not, then how? That's a valid way to declare an array of void pointers and initialise them to NULL. For static variables, the {0} isn't that important (since without {0} the variable will end up...
- Wed Feb 07, 2024 8:54 pm
- Forum: Announcements
- Topic: Forum registration
- Replies: 0
- Views: 211
Forum registration
It must be a year of elections... Unfortunately, one of the numerous Russian bot networks seems to have found us. I somehow don't expect them to be sharing interesting details about the design of the KR580VM80A As a result, forum registration might be disabled from time to time whilst I clean up the...
- Thu Feb 01, 2024 5:04 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: How to display sprites on colecovision?
- Replies: 2
- Views: 291
Re: How to display sprites on colecovision?
There's examples in examples/msx/. ex4, ex6, ex7, ex8, ex9 all use sprites.