| |
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 |
|
... 5 posts hidden. Click here to view all posts.... |
| |
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. |
| |
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... |
| |
enthusi
Registered: May 2004 Posts: 677 |
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. |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
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... |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Magervalp is right. It is precisely those thingsthose that would not be possible on C64that 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"). |
| |
Mr. SID
Registered: Jan 2003 Posts: 424 |
This just proofs that the io command in VICE is utterly useless. Even for the VIC, I'd want to see both the read and the write state of $d012. Or for timers of a CIA. Currently it's far from useful. |
| |
iAN CooG
Registered: May 2002 Posts: 3194 |
Enthusi: cheers, would be nice. But beware of the check for $1000/$9000, also $1800/$9800 should see $d800. Also, machine type can be checked.
--- monitor.c 2010-06-09 09:14:09 +0000
+++ monitor.c 2010-06-09 09:20:37 +0000
@@ -1288,4 +1288,45 @@
if (mem_ioreg_list_base) {
while (1) {
+ /* Enthusi/ONS, fix by iAN CooG - display vic regs verbosely - start */
+ if (n==0) {
+ if (machine_class == VICE_MACHINE_C64 ||
+ machine_class == VICE_MACHINE_C128 ||
+ machine_class == VICE_MACHINE_C64DTV||
+ machine_class == VICE_MACHINE_C64SC ) {
+ int v_d016,v_d011,v_d018,v_dd00,v_bank,v_bitmap,v_map,v_font,v_bmflag,v_hmflag;
+ 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) & 7) * 0x0800 + v_bank;
+ /* $1x00 and $9x00 mapped to $dx00 */
+ if ( (( v_font >> 12) == 1 ) ||
+ (( v_font >> 12) == 9 ) ) {
+ v_font = 0xd000 | (v_font & 0x0f00);
+ }
+ 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);
+ }
+ }
+ /* Enthusi/ONS, fix by iAN CooG - display vic regs verbosely - end */
mon_out("%s:\n", mem_ioreg_list_base[n].name);
start = new_addr(default_memspace, mem_ioreg_list_base[n].start);
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i have added the needed mechanisms to dump states of any io devices.... try "io d000" in recent trunk, it will give output very similar to what mr.sid suggested :) (and ofcourse its now easily possible to extend and to add whatever fancy info from the internal structures) |
| |
enthusi
Registered: May 2004 Posts: 677 |
the above posted patch is not complete obviously.
You will have to declare v_bank etc. first.
And the bitmap address need not be displayed in text-mode, etc...
But I guess if someone adds a "are we in c64-mode?"-check it could be formed into a real patch. |
| |
iAN CooG
Registered: May 2002 Posts: 3194 |
Quote: i have added the needed mechanisms to dump states of any io devices.... try "io d000" in recent trunk, it will give output very similar to what mr.sid suggested :) (and ofcourse its now easily possible to extend and to add whatever fancy info from the internal structures)
Nice, Groepaz! I've applied this change and it works for me
--- vicii.c 2010-06-09 17:16:40 +0000
+++ vicii.c 2010-06-10 09:39:16 +0000
@@ -1372,5 +1372,5 @@
m_disp = ((vic->regs[0x11] & 0x20) >> 5); /* 0 text, 1 bitmap */
- v_bank = 0; /* FIXME */
+ v_bank = vic->vbank_phi2; /* FIXME: using either vbank_phi1 is the same or not? */
mon_out("Display Mode:");
@@ -1389,5 +1389,10 @@
mon_out("\nVIC Memory Bank: $%04x - $%04x\n", v_bank, v_bank+0x3fff);
mon_out("\nVideo Memory: $%04x\n", ((vic->regs[0x18] >> 4) * 0x0400) + v_bank);
- mon_out("Character Set: $%04x\n", (((vic->regs[0x18] >> 1) & 0x7) * 0x800) + v_bank);
+ i=(((vic->regs[0x18] >> 1) & 0x7) * 0x800) + v_bank;
+ /* $1x00 and $9x00 mapped to $dx00 */
+ if ( (( i >> 12) == 1 ) || (( i >> 12) == 9 ) ) {
+ i = 0xd000 | (i & 0x0f00);
+ }
+ mon_out("Character Set: $%04x\n", i);
mon_out("Bitmap Memory: $%04x\n", (((vic->regs[0x18] >> 3) & 1) * 0x2000) + v_bank);
too bad it has to be duplicated in viciinew\ aswell |
Previous - 1 | 2 - Next |