Search found 2375 matches
- Wed Apr 17, 2024 10:07 pm
- Forum: Amstrad
- Topic: Amstrad 6128 and assembler
- Replies: 3
- Views: 26
Re: Amstrad 6128 and assembler
Ah right, yes. By default z80asm produces an object file that can be used for linking with others when producing a binary. To create a binary from a single .asm file you need to add -b to actually create a binary.
- Mon Apr 15, 2024 7:34 pm
- Forum: Other platforms
- Topic: No need to install with devcontainer+GitHub codespaces
- Replies: 3
- Views: 190
Re: No need to install with devcontainer+GitHub codespaces
The current docker file is based on alpine, so is a bit more difficult to add extra tools to - it probably makes for a more comfortable environment to use something else. They could be one file but I genuinely don't know how the existing container is being used so it's difficult to change.
- Mon Apr 15, 2024 7:30 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
BTW, what is the alloc_b0 above? Thanks A remnant from an experiment - apologies. Sure, no problem. Do you want a zip or a pull request on github? In that case, just tell me where to put the files. A PR would be great - just add the files and I'll tidy up etc - put them in libsrc/target/msx/far - t...
- Sun Apr 14, 2024 8:30 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
Very cool. Does the pragma for banking transparently take care of static variables as well? Like in this pseudocode: int test(void) { static char text[80] = "initial value"; printf("%s\n", text); } It can do, all the compilers do is switch the code and rodata sections when #prag...
- Sun Apr 14, 2024 7:38 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
I've had success with a table of JMP instructions and a trampoline function that are always kept paged in, because it simplifies usage of far code. The trampoline function can look on the stack to see what its return address is then use that to calculate which page to switch to and what the address...
- Sun Apr 14, 2024 7:23 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
I have something that looks right. Because the Heap* functions aren't address space aware, we have to wrap the calls to them, so that they work on the right bank. I've only wrapped Alloc here, but you'll need to do the same for HeapFree etc. For each bank you want to use you'll have to create the se...
- Sun Apr 14, 2024 1:03 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
Speaking of, if a have a char *__far string, how can I (s)printf it? Should I copy it to a near address and then print it? Unfortunately so. [snip] is it correct? It's not quite right, but I've not got it to work either yet, let me get back to you. I've got something that looks right, but it's erro...
- Sat Apr 13, 2024 2:11 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSX Malloc on memory > 64KB
- Replies: 16
- Views: 284
Re: MSX Malloc on memory > 64KB
Wow, congrats on doing that. I honestly never expected anyone else to implement __far pointers! I've not got any concrete answers, but take a look at the "named heap" stuff here: https://github.com/z88dk/z88dk/wiki/Classic-allocation#multiple-named-heap-malloc-library-malloch - the library...
- Fri Apr 12, 2024 9:23 pm
- Forum: Sinclair ZX
- Topic: DSKTOOL - A tool for creating Spectrum +3 game loaders
- Replies: 4
- Views: 190
Re: DSKTOOL - A tool for creating Spectrum +3 game loaders
Interesting, would be fun to add support for that into appmake etc I can understand that using a filesystem would cause a few memory problems. However, I always thought that DD_READ_SECTOR didn't use any extra memory - you provide it with the XDPB and it just reads the sector. The benefit of using t...
- Tue Apr 09, 2024 9:24 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M memory organization
- Replies: 6
- Views: 234
Re: CP/M memory organization
Yes, that would work (note the output parameter on the CRT_HEAP_ADDRESS) line:
Code: Select all
#pragma output CRT_STACK_SIZE = 1024
// Protect VIC memory < 0x8000
#pragma output CRT_HEAP_ADDRESS = 0x8000
- Mon Apr 08, 2024 5:08 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M memory organization
- Replies: 6
- Views: 234
Re: CP/M memory organization
Okay, so specific, do this to give you a 16k heap at 0x8000: // zcc +cpm heap.c long heap = 0; int main() { sbrk(0x8000, 0x4000); } The stack will be at the top of TPA (actually the address of bdos), so with a 58k TPA it'll end up in the $E000-$FFFF range. Assuming you limit your program to < ~16k y...
- Sat Apr 06, 2024 11:25 pm
- Forum: Other platforms
- Topic: No need to install with devcontainer+GitHub codespaces
- Replies: 3
- Views: 190
Re: No need to install with devcontainer+GitHub codespaces
I do like devcontainers and use them a lot for the paying job. From experiments, a small trim down of the one in your repo would work, however instinctively I don't like having two different Dockerfiles in a single repo, and any devcontainer variant does need active maintenance - eg to handle the mi...
- Sat Apr 06, 2024 11:14 pm
- Forum: Sinclair ZX
- Topic: +zx81 Noob Question About Libraries
- Replies: 19
- Views: 2332
Re: +zx81 Noob Question About Libraries
It's obviously moot, but for reference, info concerning fix8.8 is at the top of the maths page on the wiki: https://github.com/z88dk/z88dk/wiki/Cla ... -Libraries
- Sat Apr 06, 2024 11:13 pm
- Forum: Sinclair ZX
- Topic: zx81 filesystem interface with commodore 1541 drive (zx1541)
- Replies: 16
- Views: 263
Re: zx81 filesystem interface with commodore 1541 drive (zx1541)
256kb is a bit low even for some screenshots (crazy!), so I've bumped it up to 512kb. I'd certainly prefer attachments to be here rather than an rate-limiting 3rd party download site.
- Sat Apr 06, 2024 11:06 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M memory organization
- Replies: 6
- Views: 234
Re: CP/M memory organization
As we found out in an earlier topic, the allocation within the heap starts at the top of the memory allocated for it. Stack by default starts from just below bdos. The following pragmas should allow you to size and position the heap to avoid the fixed address you're using: Screenshot 2024-04-07 at 0...
- Mon Mar 25, 2024 10:34 pm
- Forum: MSX, SVI, TMS99x8 and Sega Master System
- Topic: MSXDOS2 Memory mapper test
- Replies: 2
- Views: 125
Re: MSXDOS2 Memory mapper test
That was a fun one.
mapper_routine_table() modifies the regs structure thus corrupting the segment you've just stored.
Code: Select all
void mapper_put_p2(uchar segment) {
usage = 2;
regs.Bytes.A = segment;
uint address = mapper_routine_table() + MR_PUT_P2;
- Fri Mar 22, 2024 11:25 am
- Forum: Misc
- Topic: Unit testing advice
- Replies: 1
- Views: 65
Re: Unit testing advice
We've got a homebrew one in https://github.com/z88dk/z88dk/tree/master/test that uses z88dk-ticks as the runner.
Because it runs in ticks it's perfect for logic tests, however there's nothing to stop the code running in another emulator, though you'll need to create a runner.
Because it runs in ticks it's perfect for logic tests, however there's nothing to stop the code running in another emulator, though you'll need to create a runner.
- Wed Mar 20, 2024 8:36 pm
- Forum: Sinclair ZX
- Topic: Strange Malloc Problem
- Replies: 3
- Views: 138
Re: Strange Malloc Problem
No worries.
There's no limit to the size of the array apart from how much memory you've got available.
There's no limit to the size of the array apart from how much memory you've got available.
- Tue Mar 19, 2024 8:52 pm
- Forum: CP/M, FLOS and OS related
- Topic: CP/M Plus memory management
- Replies: 5
- Views: 220
Re: CP/M Plus memory management
I just took a look at your project. This looks a bit suspicious in getDir:
Passing the address of the pointer - it should be bdos(CPM_FNXT, fcb)
Code: Select all
struct fcb *fcb;
retVal = bdos(CPM_FNXT, &fcb);
- Sat Mar 16, 2024 10:58 pm
- Forum: Sinclair ZX
- Topic: Bank 7 corruption while loading in Plus2A mode
- Replies: 7
- Views: 315
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: 94
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: 3
- Views: 138
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: 113
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: 5
- Views: 220
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: 5
- Views: 220
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...