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 > Vice Monitor
2010-06-08 00:27
Voltage
Account closed

Registered: Jul 2008
Posts: 14
Vice Monitor

Howdy all,

I've been toying with some vic timing tricks and I've read that when entering the monitor from vice, that I should see the current raster line and cycle.

I only ever get LIN 000 and CYC 000.

I'm using winvice 2.2, but I've also tried with winvice 2.1 with the same results.

Anyone have any advice?

Cheers

Voltage
2010-06-08 00:37
assiduous
Account closed

Registered: Jun 2007
Posts: 343
and whats wrong with that ? apparently vice enters the monitor at the start of a frame instead of some random cycle,thats why you`re seeing line 0 cycle 0. use `STEP` to step through the instructions or set a break point at the start of your vic code.
2010-06-08 03:45
Voltage
Account closed

Registered: Jul 2008
Posts: 14
That did the trick.

Thanks.
2010-06-08 05:19
enthusi

Registered: May 2004
Posts: 675
Yeah, I think vice does enter at the same point every time which can be a (minor) pain if you want (for example) enter during some rastersplit. Even if that area covers 80% of the screen, you're doomed to miss it and have to look for code executed in that raster-range to get a breakpoint set.
If there is some 'break at rasterline X' command I missed it as well.
But I'd want ONE! =)
2010-06-08 06:01
MagerValp

Registered: Dec 2001
Posts: 1060
z instruction (STEP) takes an option argument of how many instructions to step. The C64 executes roughly 20 instructions per rasterline, so to step down to line 100 or thereabouts use z +2000. For example on the basic screen:

** Monitor 000 001
(C:$e5cf) z +2000
Stepping through the next 2000 instruction(s).

** Monitor 100 021
.C:e5cf 85 CC STA $CC
(C:$e5cf)
2010-06-08 06:14
Mr. SID

Registered: Jan 2003
Posts: 424
Still, this kinda sucks. On Power64 I could just use the tl command to trace to the beginning of any rasterline.
Oh, and it had this command to dump the VIC state:

v vic
>VIC State (Video IC - $D000-$D02E)
>  Scanline: 0 - Cycle: 3
>
>  Display Mode: Standard Text
>  Scroll X/Y:   0/3
>  Screen Size:  40 x 25 Characters
>
>  VIC Memory Bank: $0000 - $3FFF
>  Video Memory:    $0400
>  Character Set:   $D000
>  Bitmap Memory:   $0000
>
>            Spr.0  Spr.1  Spr.2  Spr.3  Spr.4  Spr.5  Spr.6  Spr.7
>  Enabled:    No     No     No     No     No     No     No     No  
>  X-Pos:       0      0      0      0      0      0      0      0  
>  Y-Pos:       0      0      0      0      0      0      0      0  
>  Data:    $0000  $0000  $0000  $0000  $0000  $0000  $0000  $0000
>  Color:       1      2      3      4      5      6      7     12
>  Mode:      Std.   Std.   Std.   Std.   Std.   Std.   Std.   Std.
>  X-Expand:   No     No     No     No     No     No     No     No  
>  Y-Expand:   No     No     No     No     No     No     No     No  
>  Priority:  Spr.   Spr.   Spr.   Spr.   Spr.   Spr.   Spr.   Spr. 
>
>  Raster IRQ Scanline: 311
>  Enabled Interrupts:  None
>  Pending Interrupts:  Raster


I still miss that a lot in VICE...
2010-06-08 07:06
Radiant

Registered: Sep 2004
Posts: 639
(C:$dd10) io
VIC-II:
>C:d000  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 1b 00 00  00 00 c8 00   ........................
>C:d018  15 71 f0 00  00 00 00 00  fe f6 f1 f2  f3 f4 f0 f1  f2 f3 f4 f5  f6 f7 fc      .q.....................
SID:
>C:d400  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ........................
>C:d418  00 ff ff 00  00 00 00 00                                                       ........
CIA1:
>C:dc00  7f ff ff 00  65 3f ff ff  00 00 00 01  00 00 01 08                             ....M?..........
CIA2:
>C:dd00  97 ff 3f 00  ff ff ff ff  00 00 00 01  00 00 08 08                             ..?.............

You don't get the syntactic sugar and raster IRQ line/VIC bank, but otherwise it's pretty much the same.
2010-06-08 08:35
Mr. SID

Registered: Jan 2003
Posts: 424
While I can read VICE's io output too, I wouldn't go as far as calling it the same. It's not just syntactic sugar, it saves time and leaves less room for making mistakes...
2010-06-08 10:12
enthusi

Registered: May 2004
Posts: 675
Just patched vice-2.2/src/monitor/monitor.c to display this:

** Monitor 000 001
(C:$e5d4) io

Display Mode: Standard Text
GFX Mode: hires color
VIC Memory Bank: $0000 - $3fff
Video Memory: $0400
Character Set: $d000
Bitmap Memory: $0000

VIC-II:
>C:d000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>C:d010 00 1b 00 00 00 00 c8 00 15 71 f0 00 00 00 00 00 .........q......
>C:d020 fe f6 f1 f2 f3 f4 f0 f1 f2 f3 f4 f5 f6 f7 fc ...............

Could be enhanced easyly of course:
if (mem_ioreg_list_base) {
        while (1) {
            
            if (n==0)
              { 
              v_d016 = mon_get_mem_val(default_memspace,0xd016);
              v_d011 = mon_get_mem_val(default_memspace,0xd011);
              v_dd00 = mon_get_mem_val(default_memspace,0xdd00);
              v_d018 = mon_get_mem_val(default_memspace,0xd018);
              v_bmflag = ((v_d011&0x20)>>5); /* 0 text, 1 gfx */
              v_hmflag = (v_d016&0x10)>>4; /* 0 hires, 1 multi */
              v_bank = 0xc000 - (v_dd00 & 3) * 0x4000;
              v_bitmap = ((v_d018 >> 3) & 1) * 0x2000 + v_bank;
              v_map = (v_d018 >> 4) * 0x0400 + v_bank;
	            v_font = ((v_d018 >> 1) & 0x7)*0x800 + v_bank;
              /* $1000 and $9000 mapped to $d000 */
              if ((v_font==0x1000)||(v_font==0x9000)) v_font=0xd000;

              if (v_bmflag) mon_out("Display Mode: Bitmap gfx\n");
                else mon_out("Display Mode: Standard Text\n");

              if (v_hmflag) mon_out("GFX Mode: multi color\n");
                else mon_out("GFX Mode: hires color\n");

              mon_out("VIC Memory Bank: $%04x - $%04x\n",v_bank,v_bank+0x3fff);
              mon_out("Video Memory:    $%04x\n",v_map);
              if (!v_bmflag) mon_out("Character Set:   $%04x\n",v_font);
              mon_out("Bitmap Memory:   $%04x\n\n",v_bitmap);
              }




Edit: I assume this to fuck up all monitors except for x64.
2010-06-09 06:07
MagerValp

Registered: Dec 2001
Posts: 1060
What would really rock would be a command to display the internal state of the chipset, and not just its external registers. It'd be a huge help for coding VIC tricks, and the SID would show something more interesting than zeros...
2010-06-09 10:28
Frantic

Registered: Mar 2003
Posts: 1630
Magervalp is right. It is precisely those things—those that would not be possible on C64—that make a emulator monitor especially valuable in some cases. In a similar vein, one cannot really check the status of the SID at a particular moment, as it works right now. I think it only shows the last value written to any SID register for all registers (just like the real SID works, when seen from the "outside").
 
... 5 posts hidden. Click here to view all posts....
 
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
psenough
Guests online: 77
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 No Bounds  (9.6)
7 Comaland 100%  (9.6)
8 Aliens in Wonderland  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

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