Petscii Forums "PETSCII.COM"
« save-to-disk bug »

Welcome Guest. Please Login or Register.
Feb 9, 2010, 11:22am




Petscii Forums "PETSCII.COM" :: General :: DTVHacking :: save-to-disk bug
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: save-to-disk bug (Read 1,106 times)
David Murray
Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Dec 2004
Gender: Male
Posts: 1,563
Location: Kennedale, TX
 save-to-disk bug
« Thread Started on Jan 2, 2006, 2:09pm »

Earlier people had heard me complain that when saving under supermon the file would be the wrong size and be corrupt when I try to load it back. Well, yesterday I did some more testing and found that even saving a file under BASIC ends up with a file that is several times larger than it is supposed to be, and is corrupt when loading it back. However, the flashing program by Daniel Kahlin does not have this problem when it did a dump to disk of 64K. Perhaps his program accesses the drive directly rather than using the kernel. I suspect there is a bug in the kernel. My version 1 DTV does not have this flaw and I was wondering if the european PAL DTV has this problem too. If not, I might be interested in somebody sending me a ROM dump of the PAL version where I could try running it as a test-kernel and see what happens. eventually, maybe I could reflash it.

This is definatly going to make developing software more difficult. You have to be able to save your work, and it is a pain to always develop on one machine and test on another.
Link to Post - Back to Top  IP: Logged
MadModder
Senior Member
****
member is offline

[avatar]

Mod it. And then some more.


[homepage]

Joined: Mar 2005
Gender: Male
Posts: 479
Location: Sweden
 Re: save-to-disk bug
« Reply #1 on Jan 2, 2006, 2:41pm »

That is a serious drawback...

But when it comes to basic, I guess it is possible to write a new save-routine "running in the background" to at least get around the problem when coding basic... :P
Link to Post - Back to Top  IP: Logged

I've got a plan so cunning, you could put a tail on it and call it a weasel
David Murray
Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Dec 2004
Gender: Male
Posts: 1,563
Location: Kennedale, TX
 Re: save-to-disk bug
« Reply #2 on Jan 2, 2006, 2:45pm »

Well, TLR has already said it is possible to test-run a new kernel by loading it into high-memory and changing the bank or something like that. I don't know how to do it yet, but I plan to figure it out. I hope the kernel from the PAL DTV will work on the hummer. I realize hitting the reset button should reset it back to the original kernel, but I'm hoping run-stop/restore will not reset back to the original kernel. That way maybe I could load a new kernel while I'm writing code and needing to save stuff. That is, until TLR figures out how to make the flash program work on the hummer unit.
Link to Post - Back to Top  IP: Logged
tlr
Wizard's Apprentice
*****
member is offline




[homepage]

Joined: Nov 2005
Posts: 844
Location: Stockholm/Sweden
 Re: save-to-disk bug
« Reply #3 on Jan 2, 2006, 4:53pm »


Quote:
Earlier people had heard me complain that when saving under supermon the file would be the wrong size and be corrupt when I try to load it back. Well, yesterday I did some more testing and found that even saving a file under BASIC ends up with a file that is several times larger than it is supposed to be, and is corrupt when loading it back. However, the flashing program by Daniel Kahlin does not have this problem when it did a dump to disk of 64K. Perhaps his program accesses the drive directly rather than using the kernel. I suspect there is a bug in the kernel. My version 1 DTV does not have this flaw and I was wondering if the european PAL DTV has this problem too. If not, I might be interested in somebody sending me a ROM dump of the PAL version where I could try running it as a test-kernel and see what happens. eventually, maybe I could reflash it.

This is definatly going to make developing software more difficult. You have to be able to save your work, and it is a pain to always develop on one machine and test on another.


The flash utility uses the kernal to do byte for byte I/O to the disk. It does not however use the kernal load/save routines. The kernal load/save does not (and doesn't on the c64) support saving under the ROM or I/O areas.
It shouldn't make a long file though, just a file with the ROM contents where the ROM hides the RAM.

You can try DTVMON instead. It will save under ROM if you set "MEMORY" to $04.
« Last Edit: Jan 2, 2006, 5:02pm by tlr »Link to Post - Back to Top  IP: Logged
David Murray
Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Dec 2004
Gender: Male
Posts: 1,563
Location: Kennedale, TX
 Re: save-to-disk bug
« Reply #4 on Jan 3, 2006, 6:19pm »

Just an update on this. I tried TLR's kernel patching program and a kernel image from a european PAL DTV. It works, but it makes my unit boot into PAL. (probably from the missing resistors on the user-port) So I have to blindly type the following before I can even see anything on the screen:

POKE 53311,1
POKE 53312,0

At this point the screen starts working for me. Now, the good news is that when I save a program from BASIC it actually saves correctly. This confirms that the save-to-disk bug in the hummer is definatly a problem in the kernel. So eventually, whenever TLR's program will work on my flash chip (no pressure, TLR! :-) I should be able to fix the problem completely.
Link to Post - Back to Top  IP: Logged
tlr
Wizard's Apprentice
*****
member is offline




[homepage]

Joined: Nov 2005
Posts: 844
Location: Stockholm/Sweden
 Re: save-to-disk bug
« Reply #5 on Jan 3, 2006, 6:44pm »

Do this:

  • load and run kernalpatcher-20060103
  • load the dtv v2 kernal image ("L")
  • exit the kernal patcher
  • do
    Code:
    POKE2087,44
    POKE10587,234
    POKE10588,169
    POKE10589,12
    RUN

  • do "T" test kernal
  • do
    Code:
    SYS2069

  • save the patched kernal image by using ("S")




Link to Post - Back to Top  IP: Logged
David Murray
Moderator
*****
member is offline

[avatar]


[homepage]

Joined: Dec 2004
Gender: Male
Posts: 1,563
Location: Kennedale, TX
 Re: save-to-disk bug
« Reply #6 on Jan 3, 2006, 6:59pm »

I've tried this twice, but when I type RUN the screen just goes blank and never does anything after that. I did try one more time but this time I just exited the program and typed RUN again.. that worked, but if I make the POKE changes you mentioned, the program won't run anymore.

What do those POKEs do, anyway?
Link to Post - Back to Top  IP: Logged
tlr
Wizard's Apprentice
*****
member is offline




[homepage]

Joined: Nov 2005
Posts: 844
Location: Stockholm/Sweden
 Re: save-to-disk bug
« Reply #7 on Jan 3, 2006, 7:06pm »


Quote:
I've tried this twice, but when I type RUN the screen just goes blank and never does anything after that. I did try one more time but this time I just exited the program and typed RUN again.. that worked, but if I make the POKE changes you mentioned, the program won't run anymore.

Maybe you are using kernalpatcher-20060102 ? If you do you will have to change the first poke to
Code:
POKE2079,44



Quote:
What do those POKEs do, anyway?

They will hard code the graphics setup in the kernal image in ram to NTSC.

EDIT: I was a bit tired yesterday. You'll have to change the other pokes aswell
Code:
POKE9563,234
POKE9564,169
POKE9565,12

better use the latest version of the tool instead.
« Last Edit: Jan 4, 2006, 4:26am by tlr »Link to Post - Back to Top  IP: Logged
   [Search This Thread][Send Topic To Friend] [Print]

Google
Webjledger.proboards.com
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!