Revision: 18937
http://vice-emu.svn.sourceforge.net/vice-emu/?rev=18937&view=rev
Author: blackystardust
Date: 2008-06-29 21:41:40 -0700 (Sun, 29 Jun 2008)
Log Message:
-----------
Added the missing vic_peek() function (why was it in vic-mem.h if it did not exist ??), and corrected a missing shift.
Modified Paths:
--------------
branches/marco/ports/vice/src/vic20/vic-mem.c
branches/marco/ports/vice/src/vic20/vic20mem.c
Modified: branches/marco/ports/vice/src/vic20/vic-mem.c
===================================================================
--- branches/marco/ports/vice/src/vic20/vic-mem.c 2008-06-30 03:23:45 UTC (rev 18936)
+++ branches/marco/ports/vice/src/vic20/vic-mem.c 2008-06-30 04:41:40 UTC (rev 18937)
@@ -346,8 +346,6 @@
}
}
-
-
BYTE REGPARM1 vic_read(WORD addr)
{
addr &= 0xf;
@@ -367,3 +365,12 @@
}
}
+/* This function is only used by mem_get_screen_parameter(),
+ so all we return is the regs. Change this if it ever gets
+ used for other things. */
+BYTE REGPARM1 vic_peek(WORD addr)
+{
+ addr &= 0xf;
+
+ return vic.regs[addr];
+}
Modified: branches/marco/ports/vice/src/vic20/vic20mem.c
===================================================================
--- branches/marco/ports/vice/src/vic20/vic20mem.c 2008-06-30 03:23:45 UTC (rev 18936)
+++ branches/marco/ports/vice/src/vic20/vic20mem.c 2008-06-30 04:41:40 UTC (rev 18937)
@@ -822,8 +822,8 @@
void mem_get_screen_parameter(WORD *base, BYTE *rows, BYTE *columns)
{
*base = ((vic_peek(0x9005) & 0x80) ? 0 : 0x8000) + ((vic_peek(0x9005) & 0x70) << 6) + ((vic_peek(0x9002) & 0x80) << 2);
- *rows = vic_peek(0x9003) & 0x7e;
- *columns = vic_peek(0x9002) & 0xfe;
+ *rows = (vic_peek(0x9003) & 0x7e) >> 1;
+ *columns = vic_peek(0x9002) & 0x7f;
}
/************************************************************************/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|