Some final changes for the 3.2 release, including documentation updates.
Added 'ramrandom' commmandline argument, used to toggle randomizing or zeroing or all RAM in the system (both zero-page and SARA). Disassembler now properly supports all test cases, including rewinding within the debugger. Added preliminary support for disassembling from zero-page RAM. Bumped version # for final release. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2100 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
34
Changes.txt
|
@ -12,7 +12,7 @@
|
||||||
Release History
|
Release History
|
||||||
===========================================================================
|
===========================================================================
|
||||||
|
|
||||||
3.1.2 to 3.2: (August 16, 2010)
|
3.1.2 to 3.2: (August 20, 2010)
|
||||||
|
|
||||||
* NOTE: because of the many event-related changes in this release, all
|
* NOTE: because of the many event-related changes in this release, all
|
||||||
event mapping should be reset to defaults after starting Stella for
|
event mapping should be reset to defaults after starting Stella for
|
||||||
|
@ -34,12 +34,21 @@
|
||||||
now works exactly like an axis in UI mode (holding down a direction
|
now works exactly like an axis in UI mode (holding down a direction
|
||||||
continues that direction until the hat is released/centered).
|
continues that direction until the hat is released/centered).
|
||||||
|
|
||||||
* Several improvements to the debugger:
|
* Several major improvements to the debugger:
|
||||||
- user labels are now supported again
|
- the disassembler can now process multiple entry points, and
|
||||||
- 'runto' debugger command is now case-insensitive, and shows a
|
caches entry points as they're encountered (ie, the disassembly
|
||||||
progressbar while searching through the disassembly
|
isn't 'reset' each time a bank change occurs or you exit and
|
||||||
|
re-enter the debugger)
|
||||||
|
- preliminary support for disassembling from zero-page RAM
|
||||||
|
- re-added ability to change banks with the 'bank' debugger
|
||||||
|
prompt command and within the ROM disassembly UI
|
||||||
|
- user labels in disassembly are now supported again
|
||||||
|
- 'runto' command is now case-insensitive, and shows a progressbar
|
||||||
|
while searching through the disassembly
|
||||||
- the debugger window can be resized between ROM loads (previously,
|
- the debugger window can be resized between ROM loads (previously,
|
||||||
the app had to be restarted)
|
the app had to be restarted)
|
||||||
|
- fixed bug in Distella disassembler output, where it sometimes
|
||||||
|
generated addresses above $FFFF
|
||||||
- a vertical line separates the disassembly from the raw bytes
|
- a vertical line separates the disassembly from the raw bytes
|
||||||
|
|
||||||
* Fixed behaviour of SWCHB and SWBCNT; pins set to output now remember
|
* Fixed behaviour of SWCHB and SWBCNT; pins set to output now remember
|
||||||
|
@ -48,15 +57,23 @@
|
||||||
and test ROMs in this area.
|
and test ROMs in this area.
|
||||||
|
|
||||||
* Fixed bug when reading from illegal TIA addresses; a Space Invaders
|
* Fixed bug when reading from illegal TIA addresses; a Space Invaders
|
||||||
hack was showing pink enemies instead of white ones.
|
hack was showing pink enemies instead of white ones. Again, special
|
||||||
|
thanks to to Omegamatrix of AtariAge for advice and test ROMs in this
|
||||||
|
area.
|
||||||
|
|
||||||
* Fixed bug in handling INPT4/INPT5 latches from VBLANK; a least one
|
* Fixed bug in handling INPT4/INPT5 latches from VBLANK; a least one
|
||||||
ROM was working in Stella when it didn't on real hardware.
|
ROM was working in Stella when it didn't on real hardware.
|
||||||
|
|
||||||
|
* Added 'ramrandom' commandline argument, which is used to randomize
|
||||||
|
all RAM in the system; otherwise, the RAM is zeroed. This defaults
|
||||||
|
to off, which is different than previous versions of Stella.
|
||||||
|
|
||||||
* Added 'finishing touches' to some of the UI descriptions, giving a
|
* Added 'finishing touches' to some of the UI descriptions, giving a
|
||||||
better explanation of the functions. Related to this, certain
|
better explanation of the functions. Related to this, certain
|
||||||
options now show a message box explaining the option in further
|
options now show a message box explaining the option in further
|
||||||
detail (particularly the ROM Audit mode).
|
detail (particularly the ROM Audit mode). As well, when starting
|
||||||
|
Stella for the first time, a prompt appears to select a ROM
|
||||||
|
directory.
|
||||||
|
|
||||||
* Fixed bugs in the ROM launcher when viewing certain PNG images not
|
* Fixed bugs in the ROM launcher when viewing certain PNG images not
|
||||||
created by Stella. Related to this, the official PNG library is now
|
created by Stella. Related to this, the official PNG library is now
|
||||||
|
@ -64,9 +81,6 @@
|
||||||
snapshots for those ROMs which consist of several games. Thanks go
|
snapshots for those ROMs which consist of several games. Thanks go
|
||||||
to Buzbard of AtariAge for these images.
|
to Buzbard of AtariAge for these images.
|
||||||
|
|
||||||
* Fixed bug in Distella disassembler output, where it sometimes
|
|
||||||
generated addresses above $FFFF.
|
|
||||||
|
|
||||||
* Added several fixes for crashes on 'small' systems (those systems
|
* Added several fixes for crashes on 'small' systems (those systems
|
||||||
where the maximum resolution is less than 640x480).
|
where the maximum resolution is less than 640x480).
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@ the Stella Website at:
|
||||||
Enjoy,
|
Enjoy,
|
||||||
|
|
||||||
The Stella Team
|
The Stella Team
|
||||||
August 16, 2010
|
August 20, 2010
|
||||||
|
|
|
@ -64,8 +64,8 @@ feature that no other 2600 debugger has; it's <b>completely</b> cross-platform.<
|
||||||
<li>Save CLI session to a text file.</li>
|
<li>Save CLI session to a text file.</li>
|
||||||
<li>Supports hex, decimal, and binary input and output almost everywhere.
|
<li>Supports hex, decimal, and binary input and output almost everywhere.
|
||||||
(disassembly is still hex).</li>
|
(disassembly is still hex).</li>
|
||||||
<li>Support for bank switching. You can see how many banks a cart has, and the
|
<li>Support for bank switching. You can see how many banks a cart has and the
|
||||||
currently selected bank.</li>
|
currently selected bank, and manually change banks.</li>
|
||||||
<li>Registers/memory that get changed by the CPU during debugging are
|
<li>Registers/memory that get changed by the CPU during debugging are
|
||||||
highlighted when they're displayed.<li>
|
highlighted when they're displayed.<li>
|
||||||
<li>Scanline advance (like frame advance, break at beginning
|
<li>Scanline advance (like frame advance, break at beginning
|
||||||
|
@ -598,6 +598,7 @@ can also get rid of all traps at once with the "cleartraps" command.</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
a - Set Accumulator to value xx
|
a - Set Accumulator to value xx
|
||||||
|
bank - Show # of banks, or switch to bank xx
|
||||||
base - Set default base (hex, dec, or bin)
|
base - Set default base (hex, dec, or bin)
|
||||||
break - Set/clear breakpoint at address xx (default=PC)
|
break - Set/clear breakpoint at address xx (default=PC)
|
||||||
breakif - Set breakpoint on condition xx
|
breakif - Set breakpoint on condition xx
|
||||||
|
@ -932,11 +933,10 @@ TIA/RIOT labels will still be present.</p>
|
||||||
|
|
||||||
<p>The top area contains two items:
|
<p>The top area contains two items:
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Bank (current/total)</b>: Shows the current bank in use, and the
|
<li><b>Current bank (x total)</b>: Shows the current bank in use (number in textbox),
|
||||||
total number of banks. Note that bank numbers start at 0 (as in most
|
and the total number of banks (x). Note that bank numbers start at 0 (as in most
|
||||||
programming languages), so '0 / 1' actually means 'the first
|
programming languages). If the cartridge contains multiple banks, the bank can
|
||||||
bank of 1 possible bank(s)'. Due to the way the disassembler works,
|
be changed in the bank textbox, and the ROM will be re-disassembled.
|
||||||
you cannot change banks; the display is for reference only.
|
|
||||||
Note that certain ROMs are quite complex, and may only show has having one
|
Note that certain ROMs are quite complex, and may only show has having one
|
||||||
'virtual' bank when their address space can be swapped in and out in many
|
'virtual' bank when their address space can be swapped in and out in many
|
||||||
different ways.</li>
|
different ways.</li>
|
||||||
|
@ -960,8 +960,9 @@ red circle in this area. These are the same breakpoints as used
|
||||||
by the "break" command, <b>not</b> the conditional "breakif" breakpoints
|
by the "break" command, <b>not</b> the conditional "breakif" breakpoints
|
||||||
(which makes sense: cond-breaks can break on any condition, the Program
|
(which makes sense: cond-breaks can break on any condition, the Program
|
||||||
Counter isn't necessarily involved).</li>
|
Counter isn't necessarily involved).</li>
|
||||||
<li><b>Labels</b>: For now, only those generated by Distella, not ones from a
|
<li><b>Labels</b>: Any labels assigned to the given address, either generated
|
||||||
DASM symbol file or any labels created by the user.</li>
|
automatically by Distella, read from a DASM symbol file or custom
|
||||||
|
labels created by the user.</li>
|
||||||
<li><b>Instruction</b>: This is a standard 6502 mnemonic (possibly with operand).
|
<li><b>Instruction</b>: This is a standard 6502 mnemonic (possibly with operand).
|
||||||
This field also contains the cycle count for the instruction (separated by a
|
This field also contains the cycle count for the instruction (separated by a
|
||||||
semicolon).</li>
|
semicolon).</li>
|
||||||
|
@ -973,7 +974,10 @@ bytes in this field.</li>
|
||||||
<p>The 6502 mnemonic will be UPPERCASE for all standard instructions,
|
<p>The 6502 mnemonic will be UPPERCASE for all standard instructions,
|
||||||
or lowercase for "illegal" 6502 instructions (like "dcp"). If resolving
|
or lowercase for "illegal" 6502 instructions (like "dcp"). If resolving
|
||||||
of data sections has been disabled for any reason, you'll likely see a lot
|
of data sections has been disabled for any reason, you'll likely see a lot
|
||||||
of illegal opcodes if you scroll to a data table in ROM.</p>
|
of illegal opcodes if you scroll to a data table in ROM. This can also
|
||||||
|
occur if the disassembler hasn't yet encountered addresses in the PC.
|
||||||
|
If you step/trace/scanline/frame advance into such an area, the disassembler
|
||||||
|
will make note of it, and disassemble it correctly from that point on.</p>
|
||||||
|
|
||||||
<!-- TODO - is this true any longer?
|
<!-- TODO - is this true any longer?
|
||||||
<p>Beware: the cycle counts don't take into account any penalty cycles
|
<p>Beware: the cycle counts don't take into account any penalty cycles
|
||||||
|
@ -1025,11 +1029,11 @@ matches the address of the disassembly line where the mouse was clicked.</li>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>The ROM Widget only works on ROM. If your game runs code from zero-page
|
<li>The ROM Widget only works on ROM or zero-page RAM separately. If your game runs
|
||||||
RAM, the code from RAM will not be shown, and the ROM Widget will not highlight
|
code from zero-page RAM, the disassembly will show addresses $80 to $FF (zero-page
|
||||||
any instructions. Once your RAM routine returns, the ROM Widget will work
|
RAM address space) only. Once your RAM routine returns, the ROM Widget will switch
|
||||||
normally again. You can still disassemble RAM with the "disasm" command from
|
back to ROM space ($1000 - $1FFF and mirrors). The same is true of the "disasm"
|
||||||
the Prompt.</li>
|
command; it will show either ROM or RAM space, not both at the same time.</li>
|
||||||
|
|
||||||
<li>The standard VCS memory map has the cartridge port at locations
|
<li>The standard VCS memory map has the cartridge port at locations
|
||||||
$F000-$FFFF. However, not all the address lines exist on a 6507, so
|
$F000-$FFFF. However, not all the address lines exist on a 6507, so
|
||||||
|
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 476 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 860 B |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
@ -2027,7 +2027,13 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre>-tiadriven <1|0></pre></td>
|
<td><pre>-tiadriven <1|0></pre></td>
|
||||||
<td>Set unused TIA pins to be randomly driven high or low on a read/peek.</td>
|
<td>Set unused TIA pins to be randomly driven high or low on a read/peek.
|
||||||
|
If disabled, use the last databus value for those pins instead.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><pre>-ramrandom <1|0></pre></td>
|
||||||
|
<td>On reset, either randomize all RAM content, or zero it out instead.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -2152,7 +2158,7 @@
|
||||||
<tr><td>GL VSync</td><td>enable OpenGL vertical synchronization</td><td>-gl_vsync</td></tr>
|
<tr><td>GL VSync</td><td>enable OpenGL vertical synchronization</td><td>-gl_vsync</td></tr>
|
||||||
<tr><td>Grab mouse</td><td>keep mouse in SDL window</td><td>-grabmouse</td></tr>
|
<tr><td>Grab mouse</td><td>keep mouse in SDL window</td><td>-grabmouse</td></tr>
|
||||||
<tr><td>Show UI messages</td><td>overlay UI messages onscreen</td><td>-uimessages</td></tr>
|
<tr><td>Show UI messages</td><td>overlay UI messages onscreen</td><td>-uimessages</td></tr>
|
||||||
<tr><td>Center window (*)</td><td>attempt to center SDL window (requires restart)</td><td>-center</td></tr>
|
<tr><td>Center window</td><td>attempt to center application window</td><td>-center</td></tr>
|
||||||
<tr><td>Fast SC/AR BIOS</td><td>Skip progress loading bars for SuperCharger ROMs</td><td>-fastscbios</td></tr>
|
<tr><td>Fast SC/AR BIOS</td><td>Skip progress loading bars for SuperCharger ROMs</td><td>-fastscbios</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
@ -2315,15 +2321,26 @@
|
||||||
to the selected event. If nothing seems to happen, either Stella
|
to the selected event. If nothing seems to happen, either Stella
|
||||||
can't see the input device, or the selected event doesn't support being
|
can't see the input device, or the selected event doesn't support being
|
||||||
remapped to the input device.</li>
|
remapped to the input device.</li>
|
||||||
<li>Erase a mapping by clicking 'Erase', or cancel a remap in progress
|
<li>Cancel a remap in progress by clicking 'Cancel', erase a mapping by
|
||||||
by clicking 'Cancel'.</li>
|
clicking 'Erase', or reset to default mapping by clicking 'Reset'</li>
|
||||||
<li>Reset default mappings by clicking 'Defaults'.</li>
|
<li>Reset to default <b>all</b> mappings by clicking 'Defaults'.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<p>The following screenshots illustrate the event remapping process:<br><br>
|
<p>The following screenshots illustrate the event remapping process:<br><br>
|
||||||
<img src="graphics/eventmapping.png">
|
<img src="graphics/eventmapping.png">
|
||||||
<img src="graphics/eventmapping_remap.png">
|
<img src="graphics/eventmapping_remap.png">
|
||||||
|
|
||||||
|
<p>There is also a 'Combo' button in the 'Emulation Events' tab, accessible
|
||||||
|
when a Combo event has been selected from the list of events on the left.
|
||||||
|
Clicking 'Combo' will show a dialog similar to the following:</p>
|
||||||
|
<img src="graphics/eventmapping_combo.png">
|
||||||
|
<p>In this dialog, you can assign various events to the selected combo event.
|
||||||
|
Note that this simply assigns multiple events to the combo; you still need
|
||||||
|
to map the combo event itself to some action, as described in the 'remap an
|
||||||
|
event' section above.</p>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>Virtual devices can be configured under the 'Virtual Devs' tab, shown below:</p>
|
<p>Virtual devices can be configured under the 'Virtual Devs' tab, shown below:</p>
|
||||||
<table border="5" cellpadding="2" frame="box" rules="none">
|
<table border="5" cellpadding="2" frame="box" rules="none">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3199,8 +3216,8 @@ Ms Pac-Man (Stella extended codes):
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">Mark Grebe<br>
|
<td VALIGN="TOP">Mark Grebe<br>
|
||||||
(<a href="http://www.atarimac.com">http://www.atarimac.com</a>)</td>
|
(<a href="http://www.atarimac.com">http://www.atarimac.com</a>)</td>
|
||||||
<td>Author of the Macintosh OSX version of Stella starting with the
|
<td>Author of the Macintosh OSX version of Stella from releases
|
||||||
1.4 release until release 2.4. Helped with Stelladaptor support.</td>
|
1.4 to 2.4. Helped with Stelladaptor support.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3242,8 +3259,8 @@ Ms Pac-Man (Stella extended codes):
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">Kostas Nakos</td>
|
<td VALIGN="TOP">Kostas Nakos</td>
|
||||||
<td>Author/maintainer of the WinCE version of Stella starting with the
|
<td>Author/maintainer of the WinCE version of Stella from releases 2.0
|
||||||
2.0 release</td>
|
to 2.3.5</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3281,14 +3298,27 @@ Ms Pac-Man (Stella extended codes):
|
||||||
<td>Author of the OpenStep version of Stella</td>
|
<td>Author of the OpenStep version of Stella</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td VALIGN="TOP">Omegamatrix</td>
|
||||||
|
<td>Provided test ROMs which led to more accurate emulation for SWCHx/SWxCNT
|
||||||
|
and RIOT behaviour, and for 'illegal' TIA reads</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">John Payson</td>
|
<td VALIGN="TOP">John Payson</td>
|
||||||
<td>Provided EEPROM emulation code for AtariVox and SaveKey support</td>
|
<td>Provided EEPROM emulation code for AtariVox and SaveKey support</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td VALIGN="TOP">Wilbert Pol</td>
|
||||||
|
<td>Provided many ideas and some sample algorithms for greatly improving
|
||||||
|
'illegal HMOVE' emulation</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">Manuel Polik</td>
|
<td VALIGN="TOP">Manuel Polik</td>
|
||||||
<td>Author of the Windows version of Stella starting with the 1.2 release</td>
|
<td>Author of the Windows version of Stella (Cyberstella) starting with the 1.2
|
||||||
|
release until its retirement</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3320,7 +3350,7 @@ Ms Pac-Man (Stella extended codes):
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">Jason Scott</td>
|
<td VALIGN="TOP">Jason Scott</td>
|
||||||
<td>Organizer of the property file archive for early versions of
|
<td>Organizer of the property file archive for early versions of
|
||||||
Stella; now he's helping with the web site</td>
|
Stella</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3394,7 +3424,8 @@ Ms Pac-Man (Stella extended codes):
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">David Voswinkel</td>
|
<td VALIGN="TOP">David Voswinkel</td>
|
||||||
<td>Maintainer of the PSP version of Stella starting with the 2.0 release</td>
|
<td>Maintainer of the PSP version of Stella starting with the 2.0 release
|
||||||
|
until release 2.2</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -3424,7 +3455,7 @@ Ms Pac-Man (Stella extended codes):
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td VALIGN="TOP">Alex Zaballa</td>
|
<td VALIGN="TOP">Alex Zaballa</td>
|
||||||
<td>Maintainer of the GP2X version of Stella starting with the 2.1 release</td>
|
<td>Maintainer of the GP2X version of Stella from releases 2.1 to 2.3.5</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -200,7 +200,7 @@ class Array
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Namespace GUI
|
} // Namespace Common
|
||||||
|
|
||||||
typedef Common::Array<int> IntArray;
|
typedef Common::Array<int> IntArray;
|
||||||
typedef Common::Array<bool> BoolArray;
|
typedef Common::Array<bool> BoolArray;
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
/**
|
/**
|
||||||
* Simple fixed size stack class.
|
* Simple fixed size stack class.
|
||||||
*/
|
*/
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
template <class T, int MAX_SIZE = 10>
|
template <class T, int MAX_SIZE = 10>
|
||||||
class FixedStack
|
class FixedStack
|
||||||
{
|
{
|
||||||
|
@ -68,4 +70,6 @@ class FixedStack
|
||||||
int _size;
|
int _size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // Namespace Common
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#define STELLA_VERSION "3.2_test5"
|
#define STELLA_VERSION "3.2"
|
||||||
#define STELLA_BUILD atoi("$Rev$"+6)
|
#define STELLA_BUILD atoi("$Rev$"+6)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,8 +37,8 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const RamAreaList& areas)
|
||||||
for(RamAreaList::const_iterator i = areas.begin(); i != areas.end(); ++i)
|
for(RamAreaList::const_iterator i = areas.begin(); i != areas.end(); ++i)
|
||||||
addRamArea(i->start, i->size, i->roffset, i->woffset);
|
addRamArea(i->start, i->size, i->roffset, i->woffset);
|
||||||
|
|
||||||
// Create an addresslist for each potential bank
|
// Create an addresslist for each potential bank, and an extra one for ZP RAM
|
||||||
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
|
for(int i = 0; i < myConsole.cartridge().bankCount()+1; ++i)
|
||||||
{
|
{
|
||||||
AddressList l;
|
AddressList l;
|
||||||
myEntryAddresses.push_back(l);
|
myEntryAddresses.push_back(l);
|
||||||
|
@ -46,6 +46,7 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const RamAreaList& areas)
|
||||||
|
|
||||||
// We know the address for the startup bank right now
|
// We know the address for the startup bank right now
|
||||||
myEntryAddresses[myConsole.cartridge().startBank()].push_back(myDebugger.dpeek(0xfffc));
|
myEntryAddresses[myConsole.cartridge().startBank()].push_back(myDebugger.dpeek(0xfffc));
|
||||||
|
addLabel("START", myDebugger.dpeek(0xfffc));
|
||||||
|
|
||||||
// Add system equates
|
// Add system equates
|
||||||
for(uInt16 addr = 0x00; addr <= 0x0F; ++addr)
|
for(uInt16 addr = 0x00; addr <= 0x0F; ++addr)
|
||||||
|
@ -193,55 +194,59 @@ bool CartDebug::disassemble(const string& resolvedata, bool force)
|
||||||
{
|
{
|
||||||
// Test current disassembly; don't re-disassemble if it hasn't changed
|
// Test current disassembly; don't re-disassemble if it hasn't changed
|
||||||
// Also check if the current PC is in the current list
|
// Also check if the current PC is in the current list
|
||||||
// Note that for now, we don't re-disassemble if the PC isn't in cart
|
bool bankChanged = myConsole.cartridge().bankChanged();
|
||||||
// address space, since Distella doesn't yet support disassembling from
|
|
||||||
// zero-page RAM and ROM at the same time
|
|
||||||
uInt16 PC = myDebugger.cpuDebug().pc();
|
uInt16 PC = myDebugger.cpuDebug().pc();
|
||||||
int pcline = addressToLine(PC);
|
int pcline = addressToLine(PC);
|
||||||
bool changed = (force || myConsole.cartridge().bankChanged() ||
|
bool pcfound = (pcline != -1) && ((uInt32)pcline < myDisassembly.list.size()) &&
|
||||||
(pcline == -1) || mySystem.isPageDirty(0x1000, 0x1FFF));
|
(myDisassembly.list[pcline].disasm[0] != '.');
|
||||||
|
bool pagedirty = (PC & 0x1000) ? mySystem.isPageDirty(0x1000, 0x1FFF) :
|
||||||
|
mySystem.isPageDirty(0x80, 0xFF);
|
||||||
|
|
||||||
|
bool changed = (force || bankChanged || !pcfound || pagedirty);
|
||||||
if(changed)
|
if(changed)
|
||||||
{
|
{
|
||||||
AddressList& addresses = myEntryAddresses[getBank()];
|
// Are we disassembling from ROM or ZP RAM?
|
||||||
|
AddressList& addresses = (PC & 0x1000) ? myEntryAddresses[getBank()] :
|
||||||
|
myEntryAddresses[myEntryAddresses.size()-1];
|
||||||
|
|
||||||
// If the bank has changed, all old addresses must be 'converted'
|
// If the offset has changed, all old addresses must be 'converted'
|
||||||
// For example, if the list contains any $fxxx and the address space is now
|
// For example, if the list contains any $fxxx and the address space is now
|
||||||
// $bxxx, it must be changed
|
// $bxxx, it must be changed
|
||||||
uInt16 offset = (PC - (PC % 0x1000));
|
uInt16 offset = (PC - (PC % 0x1000));
|
||||||
for(uInt32 i = 0; i < addresses.size(); ++i)
|
for(AddressList::iterator i = addresses.begin(); i != addresses.end(); ++i)
|
||||||
addresses[i] = (addresses[i] & 0xFFF) + offset;
|
*i = (*i & 0xFFF) + offset;
|
||||||
|
|
||||||
addresses.push_back_unique(PC);
|
// Only add addresses when absolutely necessary, to cut down on the
|
||||||
|
// work that Distella has to do
|
||||||
uInt16 start = addresses[0];
|
// Distella expects the addresses to be unique and in sorted order
|
||||||
if(pcline == -1 && (PC & 0x1000))
|
if(bankChanged || !pcfound)
|
||||||
start = PC;
|
|
||||||
|
|
||||||
// For now, DiStella can't handle address space below 0x1000
|
|
||||||
// However, we want to disassemble at least once, otherwise carts
|
|
||||||
// that run entirely from ZP RAM will have an empty disassembly
|
|
||||||
// TODO - this will be removed once Distella properly supports
|
|
||||||
// access below 0x1000
|
|
||||||
uInt16 search = PC;
|
|
||||||
if(!(PC & 0x1000))
|
|
||||||
{
|
{
|
||||||
if(myDisassembly.list.size() == 0)
|
AddressList::iterator i;
|
||||||
search = start;
|
for(i = addresses.begin(); i != addresses.end(); ++i)
|
||||||
else
|
{
|
||||||
return false;
|
if(PC < *i)
|
||||||
|
{
|
||||||
|
addresses.insert(i, PC);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if(PC == *i) // already present
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// Otherwise, add the item at the end
|
||||||
|
if(i == addresses.end())
|
||||||
|
addresses.push_back(PC);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether to use the 'resolvedata' functionality from Distella
|
// Check whether to use the 'resolvedata' functionality from Distella
|
||||||
if(resolvedata == "never")
|
if(resolvedata == "never")
|
||||||
fillDisassemblyList(addresses, false, search);
|
fillDisassemblyList(addresses, false, PC);
|
||||||
else if(resolvedata == "always")
|
else if(resolvedata == "always")
|
||||||
fillDisassemblyList(addresses, true, search);
|
fillDisassemblyList(addresses, true, PC);
|
||||||
else // 'auto'
|
else // 'auto'
|
||||||
{
|
{
|
||||||
// First try with resolvedata on, then turn off if PC isn't found
|
// First try with resolvedata on, then turn off if PC isn't found
|
||||||
if(!fillDisassemblyList(addresses, true, search))
|
if(!fillDisassemblyList(addresses, true, PC))
|
||||||
fillDisassemblyList(addresses, false, search);
|
fillDisassemblyList(addresses, false, PC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,14 +254,13 @@ bool CartDebug::disassemble(const string& resolvedata, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool CartDebug::fillDisassemblyList(const AddressList& addresses,
|
bool CartDebug::fillDisassemblyList(AddressList& addresses,
|
||||||
bool resolvedata, uInt16 search)
|
bool resolvedata, uInt16 search)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
myDisassembly.list.clear();
|
myDisassembly.list.clear();
|
||||||
myDisassembly.fieldwidth = 10 + myLabelLength;
|
myDisassembly.fieldwidth = 10 + myLabelLength;
|
||||||
cerr << "start (" << getBank() << "): ";
|
|
||||||
DiStella distella(*this, myDisassembly.list, addresses, resolvedata);
|
DiStella distella(*this, myDisassembly.list, addresses, resolvedata);
|
||||||
|
|
||||||
// Parts of the disassembly will be accessed later in different ways
|
// Parts of the disassembly will be accessed later in different ways
|
||||||
|
@ -556,7 +560,7 @@ CartDebug::AddrType CartDebug::addressType(uInt16 addr) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
string CartDebug::extractLabel(char *c) const
|
string CartDebug::extractLabel(const char *c) const
|
||||||
{
|
{
|
||||||
string l = "";
|
string l = "";
|
||||||
while(*c != ' ')
|
while(*c != ' ')
|
||||||
|
@ -566,7 +570,7 @@ string CartDebug::extractLabel(char *c) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int CartDebug::extractValue(char *c) const
|
int CartDebug::extractValue(const char *c) const
|
||||||
{
|
{
|
||||||
while(*c != ' ')
|
while(*c != ' ')
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
class System;
|
class System;
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <set>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Array.hxx"
|
#include "Array.hxx"
|
||||||
|
@ -31,7 +33,7 @@ class System;
|
||||||
#include "DebuggerSystem.hxx"
|
#include "DebuggerSystem.hxx"
|
||||||
|
|
||||||
// Array of addresses
|
// Array of addresses
|
||||||
typedef Common::Array<uInt16> AddressList;
|
typedef list<uInt16> AddressList;
|
||||||
|
|
||||||
// pointer types for CartDebug instance methods
|
// pointer types for CartDebug instance methods
|
||||||
typedef int (CartDebug::*CARTDEBUG_INT_METHOD)();
|
typedef int (CartDebug::*CARTDEBUG_INT_METHOD)();
|
||||||
|
@ -212,12 +214,12 @@ class CartDebug : public DebuggerSystem
|
||||||
|
|
||||||
// Actually call DiStella to fill the DisassemblyList structure
|
// Actually call DiStella to fill the DisassemblyList structure
|
||||||
// Return whether the search address was actually in the list
|
// Return whether the search address was actually in the list
|
||||||
bool fillDisassemblyList(const AddressList& addresses,
|
bool fillDisassemblyList(AddressList& addresses,
|
||||||
bool resolvedata, uInt16 search);
|
bool resolvedata, uInt16 search);
|
||||||
|
|
||||||
// Extract labels and values from the given character stream
|
// Extract labels and values from the given character stream
|
||||||
string extractLabel(char *c) const;
|
string extractLabel(const char* c) const;
|
||||||
int extractValue(char *c) const;
|
int extractValue(const char* c) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CartState myState;
|
CartState myState;
|
||||||
|
|
|
@ -23,19 +23,16 @@
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
const AddressList& addresses, bool resolvedata)
|
AddressList& addresses, bool resolvedata)
|
||||||
: myDbg(dbg),
|
: myDbg(dbg),
|
||||||
myList(list)
|
myList(list)
|
||||||
{
|
{
|
||||||
|
if(addresses.size() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
while(!myAddressQueue.empty())
|
while(!myAddressQueue.empty())
|
||||||
myAddressQueue.pop();
|
myAddressQueue.pop();
|
||||||
|
|
||||||
myAppData.start = 0x0000;
|
|
||||||
myAppData.end = 0x0FFF;
|
|
||||||
myAppData.length = 4096;
|
|
||||||
|
|
||||||
memset(labels, 0, 0x1000);
|
|
||||||
|
|
||||||
/*============================================
|
/*============================================
|
||||||
The offset is the address where the code segment
|
The offset is the address where the code segment
|
||||||
starts. For a 4K game, it is usually 0xf000,
|
starts. For a 4K game, it is usually 0xf000,
|
||||||
|
@ -53,17 +50,26 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
Offset to code = $D000
|
Offset to code = $D000
|
||||||
Code range = $D000-$DFFF
|
Code range = $D000-$DFFF
|
||||||
=============================================*/
|
=============================================*/
|
||||||
if(addresses.size() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uInt16 start = addresses[0];
|
AddressList::iterator it = addresses.begin();
|
||||||
|
uInt16 start = *it++;
|
||||||
|
|
||||||
|
if(start & 0x1000) // ROM space
|
||||||
|
{
|
||||||
|
myAppData.start = 0x0000;
|
||||||
|
myAppData.end = 0x0FFF;
|
||||||
|
myAppData.length = 4096;
|
||||||
|
}
|
||||||
|
else // ZP RAM
|
||||||
|
{
|
||||||
|
myAppData.start = 0x0080;
|
||||||
|
myAppData.end = 0x00FF;
|
||||||
|
myAppData.length = 128;
|
||||||
|
}
|
||||||
|
memset(labels, 0, 0x1000);
|
||||||
|
|
||||||
myOffset = (start - (start % 0x1000));
|
myOffset = (start - (start % 0x1000));
|
||||||
|
myAddressQueue.push(start);
|
||||||
// Fill queue with start addresses (entry points into the ROM space)
|
|
||||||
for(uInt32 i = 0; i < addresses.size(); ++i)
|
|
||||||
{ cerr << hex << addresses[i] << " ";
|
|
||||||
myAddressQueue.push(addresses[i]);
|
|
||||||
} cerr << endl;
|
|
||||||
|
|
||||||
if(resolvedata)
|
if(resolvedata)
|
||||||
{
|
{
|
||||||
|
@ -75,6 +81,34 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
disasm(myPC, 1);
|
disasm(myPC, 1);
|
||||||
for (uInt32 k = myPCBeg; k <= myPCEnd; k++)
|
for (uInt32 k = myPCBeg; k <= myPCEnd; k++)
|
||||||
mark(k, REACHABLE);
|
mark(k, REACHABLE);
|
||||||
|
|
||||||
|
// When we get to this point, all addresses have been processed
|
||||||
|
// starting from the initial one in the address list
|
||||||
|
// If so, process the next one in the list that hasn't already
|
||||||
|
// been marked as REACHABLE
|
||||||
|
// If it *has* been marked, it can be removed from consideration
|
||||||
|
// in all subsequent passes
|
||||||
|
//
|
||||||
|
// Note that we can't simply add all addresses right away, since
|
||||||
|
// the processing of a single address from the address list can
|
||||||
|
// cause others to be added in the ::disasm method
|
||||||
|
// All of these have to be exhausted before consulting the address
|
||||||
|
// list again
|
||||||
|
if(myAddressQueue.empty())
|
||||||
|
{
|
||||||
|
while(it != addresses.end())
|
||||||
|
{
|
||||||
|
uInt16 addr = *it;
|
||||||
|
if(!check_bit(labels[addr-myOffset], REACHABLE))
|
||||||
|
{
|
||||||
|
myAddressQueue.push(addr);
|
||||||
|
++it;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else // remove this address, it is redundant
|
||||||
|
it = addresses.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int k = 0; k <= myAppData.end; k++)
|
for (int k = 0; k <= myAppData.end; k++)
|
||||||
|
@ -615,8 +649,6 @@ int DiStella::mark(uInt32 address, MarkType bit)
|
||||||
===========================================================
|
===========================================================
|
||||||
$00-$3d = system equates (WSYNC, etc...); mark the array's element
|
$00-$3d = system equates (WSYNC, etc...); mark the array's element
|
||||||
with the appropriate bit; return 2.
|
with the appropriate bit; return 2.
|
||||||
$0080-$00FF = zero-page RAM; mark the array's element
|
|
||||||
with the appropriate bit; return 5.
|
|
||||||
$0280-$0297 = system equates (INPT0, etc...); mark the array's element
|
$0280-$0297 = system equates (INPT0, etc...); mark the array's element
|
||||||
with the appropriate bit; return 3.
|
with the appropriate bit; return 3.
|
||||||
$1000-$1FFF = CODE/DATA, mark the code/data array for the mirrored address
|
$1000-$1FFF = CODE/DATA, mark the code/data array for the mirrored address
|
||||||
|
@ -648,12 +680,6 @@ int DiStella::mark(uInt32 address, MarkType bit)
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
/* This isn't supported by the core code yet, so why waste time checking
|
|
||||||
else if (address >= 0x80 && address <= 0xff)
|
|
||||||
{
|
|
||||||
return 5;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
else if (address >= 0x280 && address <= 0x297)
|
else if (address >= 0x280 && address <= 0x297)
|
||||||
{
|
{
|
||||||
return 3;
|
return 3;
|
||||||
|
@ -700,13 +726,29 @@ void DiStella::addEntry()
|
||||||
else
|
else
|
||||||
myDisasmBuf >> setw(4) >> hex >> tag.address;
|
myDisasmBuf >> setw(4) >> hex >> tag.address;
|
||||||
|
|
||||||
|
// Only include addresses within the requested range
|
||||||
|
if(tag.address < myAppData.start)
|
||||||
|
goto DONE_WITH_ADD;
|
||||||
|
|
||||||
// Label (a user-defined label always overrides any auto-generated one)
|
// Label (a user-defined label always overrides any auto-generated one)
|
||||||
myDisasmBuf.seekg(5, ios::beg);
|
myDisasmBuf.seekg(5, ios::beg);
|
||||||
if(tag.address)
|
if(tag.address)
|
||||||
{
|
{
|
||||||
tag.label = myDbg.getLabel(tag.address, true);
|
tag.label = myDbg.getLabel(tag.address, true);
|
||||||
if(tag.label == EmptyString && myDisasmBuf.peek() != ' ')
|
if(tag.label == EmptyString)
|
||||||
|
{
|
||||||
|
if(myDisasmBuf.peek() != ' ')
|
||||||
getline(myDisasmBuf, tag.label, '\'');
|
getline(myDisasmBuf, tag.label, '\'');
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
// FIXME - optimize this, and add as an option
|
||||||
|
stringstream str;
|
||||||
|
str << setw(4) << hex << tag.address;
|
||||||
|
str >> tag.label;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disassembly
|
// Disassembly
|
||||||
|
@ -729,6 +771,7 @@ void DiStella::addEntry()
|
||||||
}
|
}
|
||||||
myList.push_back(tag);
|
myList.push_back(tag);
|
||||||
|
|
||||||
|
DONE_WITH_ADD:
|
||||||
myDisasmBuf.clear();
|
myDisasmBuf.clear();
|
||||||
myDisasmBuf.str("");
|
myDisasmBuf.str("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class DiStella
|
||||||
@param resolvedata If enabled, try to determine code vs. data sections
|
@param resolvedata If enabled, try to determine code vs. data sections
|
||||||
*/
|
*/
|
||||||
DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list,
|
||||||
const AddressList& addresses, bool resolvedata = true);
|
AddressList& addresses, bool resolvedata = true);
|
||||||
|
|
||||||
~DiStella();
|
~DiStella();
|
||||||
|
|
||||||
|
|
|
@ -137,59 +137,59 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size, string& md5,
|
||||||
|
|
||||||
// We should know the cart's type by now so let's create it
|
// We should know the cart's type by now so let's create it
|
||||||
if(type == "2K")
|
if(type == "2K")
|
||||||
cartridge = new Cartridge2K(image, size);
|
cartridge = new Cartridge2K(image, size, settings);
|
||||||
else if(type == "3E")
|
else if(type == "3E")
|
||||||
cartridge = new Cartridge3E(image, size);
|
cartridge = new Cartridge3E(image, size, settings);
|
||||||
else if(type == "3F")
|
else if(type == "3F")
|
||||||
cartridge = new Cartridge3F(image, size);
|
cartridge = new Cartridge3F(image, size, settings);
|
||||||
else if(type == "4A50")
|
else if(type == "4A50")
|
||||||
cartridge = new Cartridge4A50(image, size);
|
cartridge = new Cartridge4A50(image, size, settings);
|
||||||
else if(type == "4K")
|
else if(type == "4K")
|
||||||
cartridge = new Cartridge4K(image);
|
cartridge = new Cartridge4K(image, settings);
|
||||||
else if(type == "AR")
|
else if(type == "AR")
|
||||||
cartridge = new CartridgeAR(image, size, settings);
|
cartridge = new CartridgeAR(image, size, settings);
|
||||||
else if(type == "DPC")
|
else if(type == "DPC")
|
||||||
cartridge = new CartridgeDPC(image, size);
|
cartridge = new CartridgeDPC(image, size, settings);
|
||||||
else if(type == "DPC+")
|
else if(type == "DPC+")
|
||||||
cartridge = new CartridgeDPCPlus(image, size);
|
cartridge = new CartridgeDPCPlus(image, size, settings);
|
||||||
else if(type == "E0")
|
else if(type == "E0")
|
||||||
cartridge = new CartridgeE0(image);
|
cartridge = new CartridgeE0(image, settings);
|
||||||
else if(type == "E7")
|
else if(type == "E7")
|
||||||
cartridge = new CartridgeE7(image);
|
cartridge = new CartridgeE7(image, settings);
|
||||||
else if(type == "EF")
|
else if(type == "EF")
|
||||||
cartridge = new CartridgeEF(image);
|
cartridge = new CartridgeEF(image, settings);
|
||||||
else if(type == "EFSC")
|
else if(type == "EFSC")
|
||||||
cartridge = new CartridgeEFSC(image);
|
cartridge = new CartridgeEFSC(image, settings);
|
||||||
else if(type == "F4")
|
else if(type == "F4")
|
||||||
cartridge = new CartridgeF4(image);
|
cartridge = new CartridgeF4(image, settings);
|
||||||
else if(type == "F4SC")
|
else if(type == "F4SC")
|
||||||
cartridge = new CartridgeF4SC(image);
|
cartridge = new CartridgeF4SC(image, settings);
|
||||||
else if(type == "F6")
|
else if(type == "F6")
|
||||||
cartridge = new CartridgeF6(image);
|
cartridge = new CartridgeF6(image, settings);
|
||||||
else if(type == "F6SC")
|
else if(type == "F6SC")
|
||||||
cartridge = new CartridgeF6SC(image);
|
cartridge = new CartridgeF6SC(image, settings);
|
||||||
else if(type == "F8")
|
else if(type == "F8")
|
||||||
cartridge = new CartridgeF8(image, md5);
|
cartridge = new CartridgeF8(image, md5, settings);
|
||||||
else if(type == "F8SC")
|
else if(type == "F8SC")
|
||||||
cartridge = new CartridgeF8SC(image);
|
cartridge = new CartridgeF8SC(image, settings);
|
||||||
else if(type == "FA" || type == "FASC")
|
else if(type == "FA" || type == "FASC")
|
||||||
cartridge = new CartridgeFA(image);
|
cartridge = new CartridgeFA(image, settings);
|
||||||
else if(type == "FE")
|
else if(type == "FE")
|
||||||
cartridge = new CartridgeFE(image);
|
cartridge = new CartridgeFE(image, settings);
|
||||||
else if(type == "MC")
|
else if(type == "MC")
|
||||||
cartridge = new CartridgeMC(image, size);
|
cartridge = new CartridgeMC(image, size, settings);
|
||||||
else if(type == "F0" || type == "MB")
|
else if(type == "F0" || type == "MB")
|
||||||
cartridge = new CartridgeF0(image);
|
cartridge = new CartridgeF0(image, settings);
|
||||||
else if(type == "CV")
|
else if(type == "CV")
|
||||||
cartridge = new CartridgeCV(image, size);
|
cartridge = new CartridgeCV(image, size, settings);
|
||||||
else if(type == "UA")
|
else if(type == "UA")
|
||||||
cartridge = new CartridgeUA(image);
|
cartridge = new CartridgeUA(image, settings);
|
||||||
else if(type == "0840")
|
else if(type == "0840")
|
||||||
cartridge = new Cartridge0840(image);
|
cartridge = new Cartridge0840(image, settings);
|
||||||
else if(type == "SB")
|
else if(type == "SB")
|
||||||
cartridge = new CartridgeSB(image, size);
|
cartridge = new CartridgeSB(image, size, settings);
|
||||||
else if(type == "X07")
|
else if(type == "X07")
|
||||||
cartridge = new CartridgeX07(image);
|
cartridge = new CartridgeX07(image, settings);
|
||||||
else
|
else
|
||||||
cerr << "ERROR: Invalid cartridge type " << type << " ..." << endl;
|
cerr << "ERROR: Invalid cartridge type " << type << " ..." << endl;
|
||||||
|
|
||||||
|
@ -227,8 +227,9 @@ string Cartridge::createFromMultiCart(const uInt8*& image, uInt32& size,
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge::Cartridge()
|
Cartridge::Cartridge(const Settings& settings)
|
||||||
: myStartBank(0),
|
: mySettings(settings),
|
||||||
|
myStartBank(0),
|
||||||
myBankChanged(true),
|
myBankChanged(true),
|
||||||
myBankLocked(false)
|
myBankLocked(false)
|
||||||
{
|
{
|
||||||
|
@ -694,7 +695,8 @@ bool Cartridge::isProbablyX07(const uInt8* image, uInt32 size)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge::Cartridge(const Cartridge&)
|
Cartridge::Cartridge(const Cartridge& cart)
|
||||||
|
: mySettings(cart.mySettings)
|
||||||
{
|
{
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
|
|
||||||
class Cartridge;
|
class Cartridge;
|
||||||
class Properties;
|
class Properties;
|
||||||
class Settings;
|
|
||||||
|
|
||||||
#include "bspf.hxx"
|
#include "bspf.hxx"
|
||||||
#include "Array.hxx"
|
#include "Array.hxx"
|
||||||
#include "Device.hxx"
|
#include "Device.hxx"
|
||||||
|
#include "Settings.hxx"
|
||||||
|
|
||||||
#ifdef DEBUGGER_SUPPORT
|
#ifdef DEBUGGER_SUPPORT
|
||||||
struct RamArea {
|
struct RamArea {
|
||||||
|
@ -69,8 +69,10 @@ class Cartridge : public Device
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Create a new cartridge
|
Create a new cartridge
|
||||||
|
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge();
|
Cartridge(const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
@ -321,6 +323,9 @@ class Cartridge : public Device
|
||||||
static bool isProbablyX07(const uInt8* image, uInt32 size);
|
static bool isProbablyX07(const uInt8* image, uInt32 size);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// Settings class for the application
|
||||||
|
const Settings& mySettings;
|
||||||
|
|
||||||
// The startup bank to use (where to look for the reset vector address)
|
// The startup bank to use (where to look for the reset vector address)
|
||||||
uInt16 myStartBank;
|
uInt16 myStartBank;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "Cart0840.hxx"
|
#include "Cart0840.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge0840::Cartridge0840(const uInt8* image)
|
Cartridge0840::Cartridge0840(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 8192);
|
memcpy(myImage, image, 8192);
|
||||||
|
|
|
@ -37,8 +37,9 @@ class Cartridge0840 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge0840(const uInt8* image);
|
Cartridge0840(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "Cart2K.hxx"
|
#include "Cart2K.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge2K::Cartridge2K(const uInt8* image, uInt32 size)
|
Cartridge2K::Cartridge2K(const uInt8* image, uInt32 size, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Size can be a maximum of 2K
|
// Size can be a maximum of 2K
|
||||||
if(size > 2048) size = 2048;
|
if(size > 2048) size = 2048;
|
||||||
|
|
|
@ -41,8 +41,9 @@ class Cartridge2K : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param size The size of the ROM image (<= 2048 bytes)
|
@param size The size of the ROM image (<= 2048 bytes)
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge2K(const uInt8* image, uInt32 size);
|
Cartridge2K(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
#include "Cart3E.hxx"
|
#include "Cart3E.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge3E::Cartridge3E(const uInt8* image, uInt32 size)
|
Cartridge3E::Cartridge3E(const uInt8* image, uInt32 size,
|
||||||
: mySize(size)
|
const Settings& settings)
|
||||||
|
: Cartridge(settings),
|
||||||
|
mySize(size)
|
||||||
{
|
{
|
||||||
// Allocate array for the ROM image
|
// Allocate array for the ROM image
|
||||||
myImage = new uInt8[mySize];
|
myImage = new uInt8[mySize];
|
||||||
|
@ -52,9 +54,12 @@ Cartridge3E::~Cartridge3E()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Cartridge3E::reset()
|
void Cartridge3E::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 32768; ++i)
|
for(uInt32 i = 0; i < 32768; ++i)
|
||||||
myRam[i] = mySystem->randGenerator().next();
|
myRam[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRam, 0, 32768);
|
||||||
|
|
||||||
// We'll map the startup bank into the first segment upon reset
|
// We'll map the startup bank into the first segment upon reset
|
||||||
bank(myStartBank);
|
bank(myStartBank);
|
||||||
|
|
|
@ -69,8 +69,9 @@ class Cartridge3E : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param size The size of the ROM image
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge3E(const uInt8* image, uInt32 size);
|
Cartridge3E(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -25,8 +25,10 @@
|
||||||
#include "Cart3F.hxx"
|
#include "Cart3F.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge3F::Cartridge3F(const uInt8* image, uInt32 size)
|
Cartridge3F::Cartridge3F(const uInt8* image, uInt32 size,
|
||||||
: mySize(size)
|
const Settings& settings)
|
||||||
|
: Cartridge(settings),
|
||||||
|
mySize(size)
|
||||||
{
|
{
|
||||||
// Allocate array for the ROM image
|
// Allocate array for the ROM image
|
||||||
myImage = new uInt8[mySize];
|
myImage = new uInt8[mySize];
|
||||||
|
|
|
@ -46,8 +46,9 @@ class Cartridge3F : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param size The size of the ROM image
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge3F(const uInt8* image, uInt32 size);
|
Cartridge3F(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
#include "Cart4A50.hxx"
|
#include "Cart4A50.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size)
|
Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size,
|
||||||
|
const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
// Supported file sizes are 32/64/128K, which are duplicated if necessary
|
// Supported file sizes are 32/64/128K, which are duplicated if necessary
|
||||||
|
@ -45,9 +47,12 @@ Cartridge4A50::~Cartridge4A50()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void Cartridge4A50::reset()
|
void Cartridge4A50::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 32768; ++i)
|
for(uInt32 i = 0; i < 32768; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 32768);
|
||||||
|
|
||||||
mySliceLow = mySliceMiddle = mySliceHigh = 0;
|
mySliceLow = mySliceMiddle = mySliceHigh = 0;
|
||||||
myIsRomLow = myIsRomMiddle = myIsRomHigh = true;
|
myIsRomLow = myIsRomMiddle = myIsRomHigh = true;
|
||||||
|
|
|
@ -54,8 +54,9 @@ class Cartridge4A50 : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param size The size of the ROM image
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge4A50(const uInt8* image, uInt32 size);
|
Cartridge4A50(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "Cart4K.hxx"
|
#include "Cart4K.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Cartridge4K::Cartridge4K(const uInt8* image)
|
Cartridge4K::Cartridge4K(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 4096);
|
memcpy(myImage, image, 4096);
|
||||||
|
|
|
@ -39,8 +39,9 @@ class Cartridge4K : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
Cartridge4K(const uInt8* image);
|
Cartridge4K(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size,
|
CartridgeAR::CartridgeAR(const uInt8* image, uInt32 size,
|
||||||
const Settings& settings)
|
const Settings& settings)
|
||||||
: my6502(0),
|
: Cartridge(settings),
|
||||||
mySettings(settings)
|
my6502(0)
|
||||||
{
|
{
|
||||||
// Minimum size supported internally is 8448 bytes
|
// Minimum size supported internally is 8448 bytes
|
||||||
uInt32 minsize = BSPF_max(size, 8448u);
|
uInt32 minsize = BSPF_max(size, 8448u);
|
||||||
|
@ -52,9 +52,12 @@ CartridgeAR::~CartridgeAR()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeAR::reset()
|
void CartridgeAR::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 6 * 1024; ++i)
|
for(uInt32 i = 0; i < 6 * 1024; ++i)
|
||||||
myImage[i] = mySystem->randGenerator().next();
|
myImage[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myImage, 0, 6 * 1024);
|
||||||
|
|
||||||
// Initialize SC BIOS ROM
|
// Initialize SC BIOS ROM
|
||||||
initializeROM();
|
initializeROM();
|
||||||
|
|
|
@ -47,7 +47,7 @@ class CartridgeAR : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param size The size of the ROM image
|
@param size The size of the ROM image
|
||||||
@param settings Used to query 'fastscbios' option
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeAR(const uInt8* image, uInt32 size, const Settings& settings);
|
CartridgeAR(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
|
@ -168,9 +168,6 @@ class CartridgeAR : public Cartridge
|
||||||
// Pointer to the 6502 processor in the system
|
// Pointer to the 6502 processor in the system
|
||||||
M6502* my6502;
|
M6502* my6502;
|
||||||
|
|
||||||
// Reference to the settings object (needed for 'fastscbios'
|
|
||||||
const Settings& mySettings;
|
|
||||||
|
|
||||||
// Indicates the offest within the image for the corresponding bank
|
// Indicates the offest within the image for the corresponding bank
|
||||||
uInt32 myImageOffset[2];
|
uInt32 myImageOffset[2];
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
#include "CartCV.hxx"
|
#include "CartCV.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeCV::CartridgeCV(const uInt8* image, uInt32 size)
|
CartridgeCV::CartridgeCV(const uInt8* image, uInt32 size,
|
||||||
: myInitialRAM(0),
|
const Settings& settings)
|
||||||
|
: Cartridge(settings),
|
||||||
|
myInitialRAM(0),
|
||||||
mySize(size)
|
mySize(size)
|
||||||
{
|
{
|
||||||
if(mySize == 2048)
|
if(mySize == 2048)
|
||||||
|
@ -66,9 +68,12 @@ void CartridgeCV::reset()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 1024; ++i)
|
for(uInt32 i = 0; i < 1024; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
myBankChanged = true;
|
myBankChanged = true;
|
||||||
|
|
|
@ -42,8 +42,10 @@ class CartridgeCV : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeCV(const uInt8* image, uInt32 size);
|
CartridgeCV(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
#include "CartDPC.hxx"
|
#include "CartDPC.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeDPC::CartridgeDPC(const uInt8* image, uInt32 size)
|
CartridgeDPC::CartridgeDPC(const uInt8* image, uInt32 size,
|
||||||
: mySystemCycles(0),
|
const Settings& settings)
|
||||||
|
: Cartridge(settings),
|
||||||
|
mySystemCycles(0),
|
||||||
myFractionalClocks(0.0)
|
myFractionalClocks(0.0)
|
||||||
{
|
{
|
||||||
// Make a copy of the entire image
|
// Make a copy of the entire image
|
||||||
|
|
|
@ -40,8 +40,10 @@ class CartridgeDPC : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeDPC(const uInt8* image, uInt32 size);
|
CartridgeDPC(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
#include "CartDPCPlus.hxx"
|
#include "CartDPCPlus.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size)
|
CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size,
|
||||||
: myFastFetch(false),
|
const Settings& settings)
|
||||||
|
: Cartridge(settings),
|
||||||
|
myFastFetch(false),
|
||||||
myLDAimmediate(false),
|
myLDAimmediate(false),
|
||||||
myParameter(0),
|
myParameter(0),
|
||||||
mySystemCycles(0),
|
mySystemCycles(0),
|
||||||
|
|
|
@ -40,8 +40,10 @@ class CartridgeDPCPlus : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param size The size of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeDPCPlus(const uInt8* image, uInt32 size);
|
CartridgeDPCPlus(const uInt8* image, uInt32 size, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartE0.hxx"
|
#include "CartE0.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeE0::CartridgeE0(const uInt8* image)
|
CartridgeE0::CartridgeE0(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 8192);
|
memcpy(myImage, image, 8192);
|
||||||
|
|
|
@ -48,8 +48,9 @@ class CartridgeE0 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeE0(const uInt8* image);
|
CartridgeE0(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartE7.hxx"
|
#include "CartE7.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeE7::CartridgeE7(const uInt8* image)
|
CartridgeE7::CartridgeE7(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 16384);
|
memcpy(myImage, image, 16384);
|
||||||
|
@ -48,9 +49,12 @@ CartridgeE7::~CartridgeE7()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeE7::reset()
|
void CartridgeE7::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 2048; ++i)
|
for(uInt32 i = 0; i < 2048; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 2048);
|
||||||
|
|
||||||
// Install some default banks for the RAM and first segment
|
// Install some default banks for the RAM and first segment
|
||||||
bankRAM(0);
|
bankRAM(0);
|
||||||
|
|
|
@ -65,8 +65,9 @@ class CartridgeE7 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeE7(const uInt8* image);
|
CartridgeE7(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartEF.hxx"
|
#include "CartEF.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeEF::CartridgeEF(const uInt8* image)
|
CartridgeEF::CartridgeEF(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
|
|
@ -43,8 +43,9 @@ class CartridgeEF : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeEF(const uInt8* image);
|
CartridgeEF(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartEFSC.hxx"
|
#include "CartEFSC.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeEFSC::CartridgeEFSC(const uInt8* image)
|
CartridgeEFSC::CartridgeEFSC(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
@ -44,9 +45,12 @@ CartridgeEFSC::~CartridgeEFSC()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeEFSC::reset()
|
void CartridgeEFSC::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 128);
|
||||||
|
|
||||||
// Upon reset we switch to the startup bank
|
// Upon reset we switch to the startup bank
|
||||||
bank(myStartBank);
|
bank(myStartBank);
|
||||||
|
|
|
@ -43,8 +43,9 @@ class CartridgeEFSC : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeEFSC(const uInt8* image);
|
CartridgeEFSC(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartF0.hxx"
|
#include "CartF0.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF0::CartridgeF0(const uInt8* image)
|
CartridgeF0::CartridgeF0(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 65536);
|
memcpy(myImage, image, 65536);
|
||||||
|
|
|
@ -40,8 +40,9 @@ class CartridgeF0 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF0(const uInt8* image);
|
CartridgeF0(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
#include "CartF4.hxx"
|
#include "CartF4.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF4::CartridgeF4(const uInt8* image)
|
CartridgeF4::CartridgeF4(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 32768);
|
memcpy(myImage, image, 32768);
|
||||||
|
|
|
@ -39,8 +39,9 @@ class CartridgeF4 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF4(const uInt8* image);
|
CartridgeF4(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartF4SC.hxx"
|
#include "CartF4SC.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF4SC::CartridgeF4SC(const uInt8* image)
|
CartridgeF4SC::CartridgeF4SC(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 32768);
|
memcpy(myImage, image, 32768);
|
||||||
|
@ -44,9 +45,12 @@ CartridgeF4SC::~CartridgeF4SC()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeF4SC::reset()
|
void CartridgeF4SC::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 128);
|
||||||
|
|
||||||
// Upon reset we switch to the startup bank
|
// Upon reset we switch to the startup bank
|
||||||
bank(myStartBank);
|
bank(myStartBank);
|
||||||
|
|
|
@ -39,8 +39,9 @@ class CartridgeF4SC : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF4SC(const uInt8* image);
|
CartridgeF4SC(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartF6.hxx"
|
#include "CartF6.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF6::CartridgeF6(const uInt8* image)
|
CartridgeF6::CartridgeF6(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 16384);
|
memcpy(myImage, image, 16384);
|
||||||
|
|
|
@ -39,8 +39,9 @@ class CartridgeF6 : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF6(const uInt8* image);
|
CartridgeF6(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
#include "CartF6SC.hxx"
|
#include "CartF6SC.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF6SC::CartridgeF6SC(const uInt8* image)
|
CartridgeF6SC::CartridgeF6SC(const uInt8* image, const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 16384);
|
memcpy(myImage, image, 16384);
|
||||||
|
@ -44,9 +45,12 @@ CartridgeF6SC::~CartridgeF6SC()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeF6SC::reset()
|
void CartridgeF6SC::reset()
|
||||||
{
|
{
|
||||||
// Initialize RAM with random values
|
// Initialize RAM
|
||||||
|
if(mySettings.getBool("ramrandom"))
|
||||||
for(uInt32 i = 0; i < 128; ++i)
|
for(uInt32 i = 0; i < 128; ++i)
|
||||||
myRAM[i] = mySystem->randGenerator().next();
|
myRAM[i] = mySystem->randGenerator().next();
|
||||||
|
else
|
||||||
|
memset(myRAM, 0, 128);
|
||||||
|
|
||||||
// Upon reset we switch to the startup bank
|
// Upon reset we switch to the startup bank
|
||||||
bank(myStartBank);
|
bank(myStartBank);
|
||||||
|
|
|
@ -39,8 +39,9 @@ class CartridgeF6SC : public Cartridge
|
||||||
Create a new cartridge using the specified image
|
Create a new cartridge using the specified image
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF6SC(const uInt8* image);
|
CartridgeF6SC(const uInt8* image, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
#include "CartF8.hxx"
|
#include "CartF8.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
CartridgeF8::CartridgeF8(const uInt8* image, const string& md5)
|
CartridgeF8::CartridgeF8(const uInt8* image, const string& md5,
|
||||||
|
const Settings& settings)
|
||||||
|
: Cartridge(settings)
|
||||||
{
|
{
|
||||||
// Copy the ROM image into my buffer
|
// Copy the ROM image into my buffer
|
||||||
memcpy(myImage, image, 8192);
|
memcpy(myImage, image, 8192);
|
||||||
|
|
|
@ -40,8 +40,9 @@ class CartridgeF8 : public Cartridge
|
||||||
|
|
||||||
@param image Pointer to the ROM image
|
@param image Pointer to the ROM image
|
||||||
@param md5 MD5sum of the ROM image
|
@param md5 MD5sum of the ROM image
|
||||||
|
@param settings A reference to the various settings (read-only)
|
||||||
*/
|
*/
|
||||||
CartridgeF8(const uInt8* image, const string& md5);
|
CartridgeF8(const uInt8* image, const string& md5, const Settings& settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destructor
|
Destructor
|
||||||
|
|