Thanks for update - OSDK 1.7 works perfect for me
.
Here are some details about FloppyBuilder, IMHO, interesting and useful:
- bug in
sector_2-microdisc.asm in the relocator code line 75:
Code: Select all
ldy #0
copy_loop
lda ($00),y
sta FINAL_ADRESS,y
iny
cpy _END_-_BEGIN_ <---- this should be: cpy #(_END_-_BEGIN_)
bne copy_loop
Actually it works and it's clear why it does, but .... it's bug and must be Dbug'ged
.
- in script file 'AddFile loader $XXXX' - specifying load address for loader is useless now,
because the real value is #define'd in disk_info.h as 'location_loader'. I had the idea to remove
this #define from disk_info.h, and put it in generated 'floppy_description.h', but this will not work
because
'location_loader' must be defined
before #include "floppy_description.h"
Generating one more
'floppy_locations.h' file which contains only:
#define location_loader $XXXX
will solve the problem.
- make ZP usage movable to not conflict with C compiler - actually it can be
'AddDefine location_zp $XX' value which is written to same generated
'floppy_locations.h' file (because of the same reason as above).
- make disk_buffer movable (i.e. not fixed at $200) - the same as ZP.
And some 'nice to have' things are:
- make 'switch to hires' to depend on 'AddDefine' value - this will allow easy to select hires or text during boot.
- make possible to declare 'AddDefine' before 'AddFile' - just for better script readability.
- add command line option to FloppyBuilder tool: -DOPTION=VALUE to overload 'AddDefine'.
Additionally:
I succeeded with 'writing to pre-allocated space'. I didn't used the code from 'disk.s' - it helped me only to find bug in my witting code, which looks just like the 'reading' code. In regard of writing I found very handy to make pre-allocating with simple: 'AddFile dummy_file.bin $XXXX', where 'dummy_file.bin' is an empty file with desired size, than I can access this space for writing exactly as for reading - with the 'FileIndex'. The limitations are clear: fixed file size, the whole file is read/written at once and only uncompressed data - but this is totally OK for 'high-score' or 'save-game' usage
So, 'ReserveSectors' seems to me bit useless now, but may be just because I don't know how to use it.
Jasmin booting works now too - it was bit tricky.
I extended the Loader API, here is my 'loader_api.h' - all functions are self explained and working:
Code: Select all
#ifndef __LOADER_API_H__
#define __LOADER_API_H__
void LoadFile(int entryindex);
void LoadFileAt(int entryindex, void* addr);
void LoadFileRun(int entryindex, void* addr);
void SaveFile(int entryindex);
void SaveFileAt(int entryindex, void* addr);
void LoadIndOn(void);
void LoadIndOff(void);
#endif /* __LOADER_API_H__ */
Dbug, because I don't want to make forks of OSDK, I'll be happy to send you my modified code and if you decide to merge it - I'll be happy twice
.
Sorry for the long post and thanks again for the OSDK release!