Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > ML Load routine makes program crashes
2014-06-05 21:24
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 :)
 
... 10 posts hidden. Click here to view all posts....
 
2014-06-05 22:19
Lux

Registered: Apr 2011
Posts: 17
Yes, monitor echoed ...

WATCH: 1 C:$0800-$0fff (Stop on load)

Thanx Groepaz!
2014-06-06 10:13
tlr

Registered: Sep 2003
Posts: 1790
.C:4af3  78          SEI
.C:4af4  A9 37       LDA #$37
.C:4af6  85 01       STA $01
.C:4af8  20 81 FF    JSR $FF81
.C:4afb  20 84 FF    JSR $FF84
.C:4afe  20 8A FF    JSR $FF8A
.C:4b01  A9 00       LDA #$00
.C:4b03  8D 20 D0    STA $D020
.C:4b06  8D 21 D0    STA $D021
.C:4b09  A9 BF       LDA #$BF
.C:4b0b  A2 4B       LDX #$4B
.C:4b0d  8D 28 03    STA $0328
.C:4b10  8E 29 03    STX $0329
.C:4b13  58          CLI
.C:4b14  A9 08       LDA #$08
.C:4b16  A6 BA       LDX $BA
.C:4b18  A0 00       LDY #$00
.C:4b1a  20 BA FF    JSR $FFBA
.C:4b1d  AD CE 50    LDA $50CE
.C:4b20  A2 AF       LDX #$AF
.C:4b22  A0 4B       LDY #$4B
.C:4b24  20 BD FF    JSR $FFBD
.C:4b27  A2 00       LDX #$00
.C:4b29  A0 08       LDY #$08
.C:4b2b  A9 00       LDA #$00
.C:4b2d  20 D5 FF    JSR $FFD5
.C:4b30  B0 2A       BCS $4B5C
.C:4b32  A2 08       LDX #$08
.C:4b34  20 C3 FF    JSR $FFC3
.C:4b37  20 CC FF    JSR $FFCC
.C:4b3a  20 81 FF    JSR $FF81
.C:4b3d  AD D8 11    LDA $11D8
.C:4b40  8D 86 02    STA $0286
.C:4b43  20 44 E5    JSR $E544
.C:4b46  AD D5 11    LDA $11D5
.C:4b49  8D 20 D0    STA $D020
.C:4b4c  8D 21 D0    STA $D021

The problem is that you leave the break vector in a crappy state after loading. If you run the program, load a font, then pop into the monitor you'll see that $0328 points to $4bed. Change that to the usual $f6ed and the program works normally.

Also in the routine there are some redundant stuff. The $ffc3 (CLOSE) and $ffcc (CLRCHN) calls are completely redundant and the $ff81 (CINT) is sort of redundant.

If you change the CINT call to $ff8a (RESTOR) it will probably work, although it will corrupt a small amount of memory at $fd30.

Q: why can't I enter an asterisk in the file load dialog?
2014-06-06 17:47
Lux

Registered: Apr 2011
Posts: 17
tlr, thank you very much, I'll make changes and test the program as you suggested.
Routine input file name allows you to enter only these characters .. ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 -+.()#!, coz' when loading (or saving) the file (from the VICE emulator) then only these characters are properly interpreted on pc.
I will implement character (*) when this load routine begins work. Once again thank you for your generous help.
I'll remove very soon link on csdb coz' this program is still in the making (it is not release).

This is simple-writer download link from dropbox ( https://dl.dropboxusercontent.com/s/7u6m4ms9mke1mi4/simple-writ.. //
I hope that I can set the download link on this forum, if it is banned I will remove it.).
2014-06-06 19:56
Hein

Registered: Apr 2004
Posts: 954
All your load crashes are belong to us!
2014-06-07 19:06
Lux

Registered: Apr 2011
Posts: 17
Guys, I've found a bug in the program. Load routine was fine. But part of the code is doing a mistake. Based on your suggestions I found a mistake. When I finish writer (very soon) I will credited you. Thanks again for your support.

Regards, Lux :))
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Linus/MSL
rikib80
rexbeng
grip
cba
void256
tlr
Epyx/TSA
Guests online: 114
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.035 sec.