Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user wil ! (Registered 2019-01-21) You are not logged in 
CSDb User Forums


Forums > CSDb Entries > Release id #148664 : C64 Debugger V0.5
2016-06-06 16:54
Moloch

Registered: Jan 2002
Posts: 1856
Release id #148664 : C64 Debugger V0.5

Certainly will give this a test run shortly, looks very handy. Hopefully a version that supports current VICE is released.
 
... 5 posts hidden. Click here to view all posts....
 
2016-06-07 12:20
Slajerek

Registered: May 2015
Posts: 28
Thanks for the testing guys.

The Madheader 2 indeed locks with CPU JAM for me during decrunching but only when AR cart is attached. I was able to run D64 without problems on debugger with pure no-cartridge environment.

Regarding automatic PRG startup I've found a small bug with this. In this version I'm loading PRG directly to memory, detecting if it starts from $0801, checking for SYS basic command and parsing the argument address, and finally making JSR automatically to that address (thus, I'm not using Basic procedures for this at all and I keep TDE always active), you can check code here: CViewMainMenu.mm (starting from line 397).

The problem is that I forgot about Basic pointers $2D/$2E-$31/$32. Some decrunchers are using these pointers to find what to decrunch, and thus unexpected behaviour can be seen because these pointers were not set. I've fixed this already and will be in next version, will push code update soon and this should fix problems with loading PRG in most cases.

By the way, do you know what other memory addresses I should care for? I've briefly gone through LOAD/RUN kernel disassembly and they set many values there, but actually what I need to set to "mimic" state after LOAD/RUN apart from $2D-$32 pointers? By the way, I also set $CC now to stop cursor blinking. In overall it is a hack to load PRGs quickly, intended rather for coders to allow quick dev workflow via command line.

Anyway, another thing - when there's a CPU JAM the emulation automatically pauses to let coder check what happened. You need to continue emulation to have it working after reset (by pressing F11). So whenever you hit CPU JAM and send the Reset command then you need to run/continue the emulation (F11). I've also already changed this behaviour, so in next version when CPU is in jam state then CTRL+R will run/continue emulation automatically...

It is not that easy to create a simple patch for VICE to have it nicely integrated as frankly speaking VICE is huge and thus I took only a C64 subset, and I had to mess with VICE internals and core functions. I have some ideas how to automate this, but that's a bit of chunk of careful coding. I run through diffs already and indeed I see some nice changes in emulation engine. It is doable hopefully.

Editing keys mapping and shortcuts is in my top priority list. Simply I wasn't on time with this feature before Stary Piernik party... :)
2016-06-07 13:03
iAN CooG

Registered: May 2002
Posts: 2177
also $ae/af should be updated, copy from $2d/2e after load finishes, actually kernal updates $ae/af during loading because it's the pointer of the current byte to store, and then updates $2d/2e .
2016-06-07 13:25
Angel of Death

Registered: Apr 2008
Posts: 182
Thanks for the quick reply everyone.
I see your point Slajerek but you should realize that tools like this will not only be used for debugging of our own programs but also for hacking other people's work.
:)

ps.
reset bug? RTFM!
2016-06-09 11:50
enthusi

Registered: May 2004
Posts: 656
> but also for hacking other people's work.

Indeed. Very much so. These kind of quick (graphical) overview debuggers are very helpful to quickly grasp data-structures, memory-layouts, sprite handling etc.
2016-06-10 05:47
Endurion

Registered: Mar 2007
Posts: 57
Also, what Groepaz said about VICE: Make the C64s memory states easier available (mem mapped files?), the remote monitor access to all C64k is annoyingly slow and the binary access pretty shaky.
2016-06-10 10:28
Slajerek

Registered: May 2015
Posts: 28
Thanks Endurion, good idea about these mem map files.

I've added C64 RAM memory mapping via mmap to a file already. It works although it's slowing down emulation a bit. Mapping RAM was quite easy to do, but having this for chips states, colour RAM etc is going to be a bit pain as there is no "memory" for chips per se, but rather register read/write functions.

I will add this as an option in Settings.

I'm planning also to add suggestion from Conjuror "write the memory to file for a specific set of frames".

Ahh, and yes I do know that this tool is going to be used to hack other's stuff. I literally spent hours playing with Glasnost's zoomer from The Un-named Demo ;-)
2016-06-10 16:28
Groepaz

Registered: Dec 2001
Posts: 8973
endurion: you could start by providing a proper bug report - i dont know of any problems with those features for that matter :)
2016-06-20 04:27
Keys

Registered: Jan 2012
Posts: 1
I'm trying to autorun from a D64, but I can't find an option to do so. Is this not implemented or am I just missing something?
2016-06-20 13:14
Slajerek

Registered: May 2015
Posts: 28
Running directly from D64 is not implemented yet.
2016-06-21 21:02
Slajerek

Registered: May 2015
Posts: 28
I added mapping of C64 memory into a file via mmap. It works like a charm on Linux and MacOS, in a way that I can view "live" C64 memory and apply edits just by writing to the file (f.e. using external hex editor), and that changes are immediately reflected in C64 memory.
I tried to have the same feature on Windows using Memory Mapped Files (mmap is not existing on Windows), for example using this: http://www.beyondlinux.com/windows-file-api-samples/windows-fil..
Also I tried a mmap implementation via this wrapper: https://github.com/witwall/mman-win32
Although I can see memory in a file and browse it correctly, the file is locked for write, and does not matter what file attributes I set (FILE_SHARE_READ | FILE_SHARE_WRITE), it is not possible to write to that file and see it reflected in C64 memory using external software...
Any Windows hackers here that can help me with this...? Is such read/write mapping to file actually doable on Windows...? Maybe some clue what I'm doing wrong?
Thanks in advance.
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
the pro/excess
hedning/G★P
E$G/I-IokutO ForcE
JackAsser/Booze Design
Yazoo/Arsenic
pcollins/Excess
Knut Clausen/SHAPE/F..
psych858o/MSL/Elysiu..
Guests online: 33
Top Demos
1 Uncensored  (9.7)
2 Unboxed  (9.7)
3 Comaland 100%  (9.7)
4 Edge of Disgrace  (9.7)
5 Coma Light 13  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.6)
9 C=Bit 18  (9.6)
10 X Marks the Spot  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.7)
2 Daah, Those Acid Pil..  (9.5)
3 FMX Music Demo  (9.5)
4 Arok 20 Invitation  (9.5)
5 Pandemoniac Part 2 o..  (9.5)
6 Dawnfall V1.1  (9.4)
7 Crystal Gazer  (9.4)
8 Merry Xmas 2017  (9.4)
9 Rewind  (9.4)
10 Party Horse  (9.4)
Top Groups
1 PriorArt  (9.8)
2 Performers  (9.5)
3 Oxyron  (9.4)
4 Booze Design  (9.4)
5 Censor Design  (9.3)
Top Original Suppliers
1 hedning  (9.8)
2 Derbyshire Ram  (9.3)
3 Jazzcat  (9.1)
4 Irata  (9.0)
5 Fungus  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.058 sec.