Commit Graph

27 Commits

Author SHA1 Message Date
TomCh
04ba39b1dd Debugger: support prefixed addresses for mini memory dump windows (PR #1427)
* Mem dump cmds without any args will now display the prefix address
* Support data sub-window (that reflects m1 dump)
* Breakpoint display: Right align R and W at end of line
* Help doc: Update Memory page to include prefix address examples
* Help doc: Update Breakpoint & Memory pages: add images showing address prefixes as shown in the UI
---------
Co-authored-by: michaelangel007 <michaelangel007@sharedcraft.com>
2025-09-08 21:58:22 +01:00
TomCh
54f86f0cdc Debugger: support address prefixes for slot, bank, language card & ROM (#1419)
* Minor tidy

* Changes:
. semicolon now Comment EOL
. double fwd-slash now Divide floor
. (single fwd-slash unassigned)

* . fwd-slash now parsed in Range_GetPrefix()
. WIP: 'bp bank/addr'

* Add error msgs

* Extend Breakpoint_t struct

* Update cmd 'bpl' to support displaying prefixes

* Do prefix checks & output error msgs

* Add _CheckBreakpointValueWithPrefix()
. support bank, for BP_OP_EQUAL
Stop reason: include BP id

* WIP: fix BPs (non-BPM)

* Fix cmd 'bpr'

* Stop reason: don't show BP id for BP_HIT_REG (as it already includes it)
Add comment about nArgs from calling funcs
Refactor _CmdBreakpointAddCommonArg(): nArgs

* Stop reason for memory BP: show full prefixed address

* Stop reason: output BP id in consistenct way

* Support ROM prefix filter

* Complete addr prefix logic

* Improve logic

* BP: 'HDD DMA to/from memory' - use common hit id function

* Support rw bank 100

* Support double forward-slash at start of line as a comment

* Refactor: use debugger naming convention for vars

* Changed prefix errors from 'bad' to 'out-of-range'

* DebugInitialize(): Reset g_breakpointHitID

* Refactor: use debugger var naming convention & formatting style

* Switch divide-operator to the underscore char, and allow double-fslash as a comment anywhere on a line

* Update help for debugger calculator

* Update help for debugger breakpoints

* Update help for debugger breakpoints (conditional)

* Fix help:breakpoints.html & fix ArgsGetRegisterVlaue() to do case-insensitive compare

* Fix underscore to be treated as a alphanumeric in a few edge cases

* Revert to using '//' as divide operator

* Help: update debugger Breakpoints & Calculalor pages

* Help: update debugger Calculator (missed one)

* Detabify and align

* Display (1) or (2) prefix for LC1 or LC2 breakpoint

* #1419 Added Aux.1 and Aux.N indicators

* Display (1) or (2) suffix for LC1 or LC2 breakpoint

* Extend cmd 'bpl' to display BP's end addr

* Show both bank and slot together

* Fix spacing for BP with range

* Add: FG_INFO_BP_MEM, FG_INFO_MEM_WRITE, BG_INFO_MEM_BANK_LC, FG_INFO_MEM_BANK_LC colors

* Cleanup

* Add 3x5 mini hex numbers

* Mini hex font to have rounded 0,A,C glyphs

* Display 2 hex Bank now

* Support edge-case for bank 0x100

* Tidy up end red spacer

* Refactor & introduce new struct AddressPrefix_t

* Fix a few bugs:
. bpl: fix end addr
. fix for 'R' and 'W' not coloured for single-byte BPs (eg. bpmr 100)

---------

Co-authored-by: michaelangel007 <michaelangel007@sharedcraft.com>
2025-09-06 02:43:57 -07:00
TomCh
839c493b67 Support IIe aux slot: 80-col(1KiB) card via generic read ptrs (#1341, PR #1391)
Better support the IIe's aux slot when it's empty or has the 80-col(1KiB) card.
- any h/w using this alternate CPU emulation, (ie. aux=empty or 80-col(1KiB)), then the 'mem' cache is completely bypassed.
Debugger: change all the direct 'mem' accesses to go via ReadByteFromMemory().
TestCPU6502: test the alt CPU emulation code too.
2025-04-03 21:10:02 +01:00
tomcw
105537e4e0 Fix 'bad dynamic cast' for when slot-0 is empty 2024-03-22 23:16:37 +00:00
TomCh
10bf60e149 Support an extra Saturn card in slot 3 and for all Apple II models. (#1279, PR #1284)
. Command line config only, and only permitted in slot 3 for now.
. Save-state Unit v9: Extended: memory (added 'Last Slot to Set Main Mem LC', 'MMU LC Mode').
. Add LanguageCardManager class.
2024-03-22 21:36:50 +00:00
Kelvin Lee
2d4f60452f Add ByteToHexStr() and WordToHexStr() (PR #1064)
- Simplify common StrFormat(), especially in Debugger (changes upcoming)
- Add helpers StrAppendByteAsHex() and StrAppendWordAsHex()
- Add helpers StrBufferAppendByteAsHex() and StrBufferAppendWordAsHex() for plain string buffer
2022-03-22 19:19:50 +00:00
Kelvin Lee
dfb8802763 Replace sprintf() with StrFormat() (PR #1048) 2022-03-02 21:10:41 +00:00
Kelvin Lee
80f3eaeb91 Various *Name() functions can simply return const std::string& (PR #1049) 2022-02-28 20:52:18 +00:00
Andrea
7ab65492c6 Load save-state for Cards: improve error messages. (#1025)
. better error message for (unlikely) slot mismatch.
. better error message if load state version is invalid.
2022-01-30 21:25:40 +00:00
Andrea
47f721882e throw std::runtime_error instead of std::string (PR #1011)
+ add more information about location of yaml parser error.
2021-12-18 16:37:28 +00:00
tomcw
19aadbfb8d Add a top-level catch-handler for std::string 2021-12-11 20:27:39 +00:00
Andrea
177c9fec05 Make Slot 0 more consistent with other slots. (PR #1006) 2021-12-11 15:26:09 +00:00
Andrea
0b2104cc89 Card::Save/LoadSnapshot (PR #1003)
Add 2 virtual methods to Card to load and save snapshots.
2021-11-25 20:23:21 +00:00
Andrea
8662a99179 Add InitializeIO() to Card and CardManager (PR #999)
. Card::InitializeIO() is pure virtual
. CardManager::InitializeIO() initialises all cards
2021-11-11 21:45:55 +00:00
tomcw
d96ed5b8c5 Refactor: move m_slot into Card class 2021-11-01 21:01:28 +00:00
Andrea
d2a34e1f91 Remove VirtualAlloc, VirtualFree & ZeroMemory. (PR #884)
. Allocation in Memory.cpp: keep VirtualAlloc of size=64KiB (alignment=64KiB) to ease debugging.
2020-12-10 21:08:15 +00:00
Andrea
bbe88da787 AppleWin.cpp split (PR #875)
. Split AppleWin -> Core with the functionality really needed by the emulator.
. Split AppleWin -> Utilities for generic code not called by other emulator components.
. Split AppleWin -> CmdLine for the command line option parsing.
2020-11-26 21:50:06 +00:00
tomcw
bd1d65ce4f Renamed Applewin.h to AppleWin.h across entire project 2020-11-11 22:12:39 +00:00
Andrea
01ad5d1882 Ensure all header files can be included (in any order) after stdafx.h. (PR #866) 2020-11-11 21:15:27 +00:00
TomCh
769d4c6927 Support 2nd Disk][ card and improved card management (#726) (PR #741)
Support 2nd Disk][ in slot-5, via command line:
- -s5 diskii
- -s5d1 \<imagefile\>
- -s5d2 \<imagefile\>

NB. there's currently no Configuration UI support, except the Drive icons' tooltips show what's in slot-5 & slot-6 (for drive-n). So there's no way to eject the disks or insert new disks. The use-case I'm supporting it Wasteland which just has the 4 disks in the 4 drives.

Improved card management:
- Added `class Card` (in Card.h) which all other cards (that exist as classes) derive from (eg. LC,SSC,Mouse,Disk2).
- Added `class CardManager` (in CardManager.cpp\h) which now manages the 8 slots (and aux slot).
- Added `class Disk2CardManager` (in Disk2CardManager.cpp\h) which provides methods for operations that act on all Disk2 instances at the same time.
- Currently limited to just 1x SSC and 1x Mouse card (why would you need more?). This simplifies things, meaning there's no need to have dedicated SSCManager / MouseCardManager objects.
- Currently the 2nd Disk2 card can only be put into slot-5. This limitation is just due to the complexity of the Configuration UI. Having a more general drop-down per slot UI would remove this limitation.
2019-12-19 19:42:30 +00:00
tomcw
d39ba32e8a LC: Support write-enabling LC via single 'INC abs,X' opcode for 6502 & 65C02. (#404, #700) 2019-10-12 22:34:35 +01:00
tomcw
8a55e35e2d LC: fixed INC to only write-enable LC for 65C02 (#700) 2019-10-12 18:17:11 +01:00
tomcw
9994635e13 LC: Support write-enabling LC via single 'INC abs' and similar RMW opcodes (#700) 2019-10-08 22:12:35 +01:00
tomcw
6fb5b3b0e8 Refactor: consolidate 'modechanging' optimisations into a single function 2018-11-10 10:30:19 +00:00
TomCh
42c58f54e7 Refactor Language Card (#593)
* Refactor Language Card:
. MemSetPaging() now not used for $C080-C08F accesses.
  - Instead LC registers its own I/O handler like all other slot 1-7 cards.
. Saturn uses base LC's 16K for bank0

* Move all 'modechanging = 0' to UpdatePaging()
2018-11-09 20:51:51 +00:00
TomCh
13c393624b Apple II original: default to 48K (ie. no Language Card) (PR #592)
Added support for #590:
* Changed Apple II original to default to no LC
* Added new cmd-line switch: -s0 <languagecard|lc>
* Changed so when LC is in slot-0, it now use Apple II+'s F8 (auto-start) ROM
2018-11-04 15:07:46 +00:00
TomCh
46274d4d1c Apple II: Language Card and Saturn support for slot-0 (PR #589)
Support for #408:
* added slot-0 LC and Saturn 128K for Apple II and II+
* added save-state support
  - for slot-0 LC/Saturn, save the LC state in the slot-0 card, not the //e MMU; and switch to a new Apple2 unit ver2
* added g_Slot0, g_SlotAux
* added new LanguageCard.cpp/h to project and moved Saturn code into these new files.
* updated VS2013,2015,2017 projects
2018-10-26 11:23:30 -07:00