| |
Lux
Registered: Apr 2011 Posts: 17 |
ML Load routine makes program crashes
Hi guys,
I'm doing a simple noter. In program, I use simple load routine from codebase64 (Richard Bayliss routine, http://codebase64.org/doku.php?id=base:disk_loader_with_flashin..). I'm loading font files on address $0800. Noter starting at $4000 in memory so there is no overlaping with ML code of noter. Every font file I'am using for loading are saved from $0800 to $1000. Noter working ok (editing, using menus etc.), but after loading font file, main program start to behaves strangely and in some cases crashes (yes!). There is no way that font file overlap ML code, I check it. So my question is .. is there something to do after using load routine (to do kernel cals, to reset something or ..?).
Perhaps some of you have had a similar problem so please help.
Lux :) |
|
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Hard to tell without knowing exactly what you are doing. Could you post some code? Source or binary is ok. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
your program relies on pointers/zeropage locations which are used by the kernal? |
| |
Lux
Registered: Apr 2011 Posts: 17 |
This is memory locations:
$0800 - $1000 default font
$1000 - $1300 noter preview
$1300 - $4000 screen data
$4000 -> editor code
Editor started on $4000, and after starting editor, there is MENU with different task.. create page, edit page, del.pag etc.
I'am testing this editor in VICE + kickassembler, but I also have real hardware + 1541U2, for real testing.
I'll upload D64 image with prg+fonts on csdb.
Much appreciate your help. I will soon set up a link. |
| |
Lux
Registered: Apr 2011 Posts: 17 |
Zeropage locations I'am using for memory transfers, when I deleting or inserting page.
More using locations in editor memory area or in noter area. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
you should try loading with this instead, its compatible with kernal friendly load speeders, and only does whats needed in the CORRECT way:
http://codebase64.org/doku.php?id=base:loading_a_file
Richard's routine does a lot of very risky things it shouldnt. (patching run/stop vector, calling shitloads of kernal/basic routines that are NOT needed for a simple load, etc etc) |
| |
Lux
Registered: Apr 2011 Posts: 17 |
Guys, this is link:
Simple Writer V0.8 |
| |
Lux
Registered: Apr 2011 Posts: 17 |
Oswald, thanks for reply. Yes, I also used that simple load routine, same problem happens, very strange. I tested yesterday with almsot 20 font files. Some file loaded ok, but some not. I saved files from same memory location. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
try to enter monitor while your program is running and simply fill the font memory with various values and see if your code still survives. if doesnt then your code is accidentally relying on a value in font space. if it still works, then possibly you have a zeropage conflict with kernal.
edit: maybe some vice monitor gurus can tell you how to create a breakpoint to see if your code reads into font memory. |
| |
Lux
Registered: Apr 2011 Posts: 17 |
Oswald, thanks for the advice, it seems to me that I could use to find the cause. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
> break load 800 fff (or even "load exec") |
... 5 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |