Commit Graph

106 Commits

Author SHA1 Message Date
tomcw a16a134ae5 Robocom Interface Module dongle: use actual values for 1000 & 1500 series dongles. (#1247) 2024-02-24 20:12:06 +00:00
TomCh 927b0da09a
Support Robocom's Interface Module protection dongles (#1247, PR#1248) 2023-07-17 21:02:55 +01:00
TomCh 5ba153c244
Add support for SD Music card (PR #1217)
Differences compared to Mockingboard:
. Only one 6522
. AY8913 is selected by address b7

Add cmd line: -sN sdmusic
Add cmd line: -mb-audit (to enable selection of additional sound cards, eg. for mb-audit)
2023-04-28 16:41:22 +01:00
TomCh 273d07d83f
Support MegaAudio card for testing mb-audit (PR #1211)
Differences compared to Mockingboard:
. TIMER1 underflows to $FFFE before it's reloaded with latch.
. TIMER1's LATCH=$0000 gets interpreted as $FFFF.
. Partial TIMER2 support: IFR.T2 gets set on underflow. But T2 reads as 0x00FF.
. AY register reads are unsupported (always read as 0).

Config->Sound: show 'MEGA Audio' in drop-down menus only if it was specified on the cmd line.
2023-04-12 18:19:18 +01:00
TomCh 7aef95f071
Support Cortechs Corp CodeWriter protection key (#1205) 2023-03-31 12:01:19 +01:00
tomcw 055c299bb4 Debugger: use dedicated MB structs to populate mini-mem views.
Remove old v1 save-state header files.
2023-03-09 20:16:21 +00:00
tomcw b0220169b8 Fix a few Coverity issues (#470) 2023-02-05 21:53:51 +00:00
TomCh 71c67cf132
Refactor Mockingboard into a class (#1171)
Mockingboard or Phasor cards can be inserted into any slot.
Change Config->Sound to that slots 4+5 to be individually selected for the 3 soundcard types.
Add MockingboardCardManager class to manage multiple cards and mix the sound buffers.
2023-01-28 18:15:28 +00:00
tomcw af9d2a6402 Help: add info about dongle 2023-01-01 19:34:32 +00:00
tomcw 043bc49f3d Add a new Registry Configuration interface: "Game I/O Connector" (like Slots).
Change Config->Advanced to show 'Game I/O Connector' (instead of 'Copy Protection Dongle').
2022-12-31 17:32:50 +00:00
Matthew D'Asaro e5a87b5063
Add support for hardware copy protection dongles in game i/o socket (#1153, PR #1154)
Changes:
- Add a drop-down menu to the 'Advanced' tab that lets the user select a dongle in use
- Add a new file "CopyProtectionDongles.cpp" that is a place to put drivers for these.
- Add a driver for the one known dongle we have now - Speed Star
- Modify Joystick.cpp to allow PB0-PB2 to be "pushed" by the protection dongle.
2022-12-16 09:04:29 +00:00
TomCh 8cd51ba155
Show Disk II Slot 5 status (#1134, PR #1137)
. In 2x windowed mode: always show slot 5 Disk II LEDs.
. Add tooltips for slot 5/6 track/sector info (d1 & d2) - shows dec/hex & fractional track position.
  - but this track/sector info is now on a UI toggle in the Config -> Disk tab.
. Debugger: add 'DISK SLOT n' - to set current slot of Disk II card
  - ie. support 'DISK INFO' for slot 5
2022-11-17 21:08:11 +00:00
Andrea 60cbbb40db
Uthernet II: 2 fixes and minor changes (PR #1100)
* Enable virtual DNS by default.
* Improve handling of header size:
This fixes an issue in UDP, where it would not take the header size into account when deciding how much to read.
* IPRAW socket. Fix an issue where the header would include "our" IP Address.
The doc is not very clear 5.2.3: they say "destination". But for consistency with UDP (5.2.2) where it seems clear that this is the peer's ip, we replace with the "destination" of the socket, or the "source" of the packet.
* minor tweak: signal with SOCK_SYNSENT that a connection is being established.
* remove Socket::myErrno as it serves no purpose.
It is a duplicate of (sn_sr == W5100_SN_SR_SOCK_SYNSENT).
* add some logging when reading/writing on a closed socket.
2022-05-19 19:30:34 +01:00
Andrea 6a5ea92a4e
Uthernet II: add virtual DNS feature (PR #1097)
Uthernet II: add extended feature to virtualise DNS requests.
. This allows pure TCP/UDP sockets to run *without* MACRAW requests (and so without libpcap).
. Raw sockets will not work.
. Add configuration for Virtual DNS.
libpcap: ensure all functions check if the library is loaded before using it.
Uthernet 1: do NOT overwrite tfe_cannot_use as it should only reflect the availability of npcap on *this* system.
Add Copyright notice, and mention Virtual DNS in html.
2022-05-08 16:26:01 +01:00
TomCh b4b29e1ef5
Refactor ParallelPrinter.cpp/h as a C++ class (PR #1067)
Add command line:  -s1 parallel.
NB. Only a single Parallel Printer card is supported, and currently it's restricted to slot 1.
2022-03-18 22:04:34 +00:00
Andrea a4341aa808
tfesupp: remove all manual string manipulations - just use std::string. (PR #1065) 2022-03-14 21:12:52 +00:00
Andrea 231e6c6d64
Cards: remove special call to InitializeIO() for Disk and Harddisk. (PR #1061) 2022-03-13 15:45:43 +00:00
Andrea 9f8c4d99af
Add Uthernet II support and make Uthernet I a Card. (PR #1047)
. tfe.cpp renamed to Uthernet1.cpp.
. add class NetworkBackend: common to both U1 and U2 cards, and abstracts Windows/Linux backends.
. modernise error message if WPCAP.DLL is not installed.
2022-02-27 17:26:48 +00:00
Kelvin Lee 253a59fde6
Replace sprintf_s() and wsprintf() with StrFormat(). (PR #1041)
And these Debugger related:
. Improve FormatAddress() and GetSymbol().
. GetSymbol(), FindSymbolFromAddress(), FormatAddress() are changed to use std::string instead.
. Remove static variable (not nice) in FormatAddress().
. GetSymbol() returns std::string reference instead of pointer.
2022-02-26 17:54:06 +00:00
Kelvin Lee 1a4e933778
Replace StringCbPrintf() with StrFormat() (PR #1032) 2022-02-15 18:48:20 +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
TomCh 443545b0f6
Support SHR video modes with a VidHD card (#997, PR #1004)
Support VidHD in slot 3 (via Config GUI or '-s3 vidhd') for SHR video modes only.
- AppleWin window is slightly enlarged when VidHD card is inserted.
Support IIgs 320x200 (and fill mode) and 640x200 video modes.
Debugger: add 'shr' command to view video
CUI: Allow user to specify width & height (for full-screen); and allow separate x,y scaling in full-screen mode.
2021-11-30 21:41:02 +00:00
TomCh ff7c9dc185
Make harddisk a class (#995)
. Add user-protection when unchecking HDD controller (as images aren't restored on a 'cancel')
. Fix possible crash when removing (via Config->Disk) either Disk2 card(s5) or HDD card(s7), then cancelling during emulation
. Fix m_buf[] size
2021-11-01 20:12:42 +00:00
Andrea 830030ee05
Simplify logic around CConfigNeedingRestart (PR #955) 2021-10-31 12:14:47 +00:00
tomcw ca611eaa64 Mousecard: fix persisting card in slot-4 after a VM restart. (Fixes #993) 2021-10-19 21:56:19 +01:00
TomCh 4aa6e05528
Support Uthernet save-state (#984)
Uthernet card: support save/load state
2021-09-21 21:32:14 +01:00
TomCh ed298b4fd9
Improve save-state card management (PR #983)
Initially all cards are removed before loading save-state.

Use new Registry "Configuration/Slot 2" location to save SSC's port name.
Use new Registry "Configuration/Slot 7" location to save HDV's image names.
Use new Registry "Configuration/Slot n" (and "Configuration/Slot Auxiliary") locations to save all other card types.

Command line: -s<slot> (eg. -s7 empty) now get persisted to the Registry.

Only update 'HDV Starting Directory' for slot7 & drive1.
2021-09-17 20:43:10 +01:00
TomCh 685b93f387
Add 4Play & SNES MAX card support (#946, #972, PR #982)
Support these new cards in slots 3, 4 or 5; based on code from Lukazi.
- extend Configuration's Input prop sheet page.
- add save/load snapshot for both cards.
- add command line switch for alt controller type (for SNES MAX card).
Change to using Registry's 'Configuration\Slot 3' for slot 3 cards (Uthernet, 4Play & SNES MAX).
Update help doc.
2021-09-10 13:57:55 +01:00
TomCh 7b55e994ec
Config GUI for DiskII card in slot-5 & improved slot config in Registry (#975, #977, PR #978)
Change to using Registry's 'Configuration\Slot n' for disk ii image pathnames (was 'Preferences').
Delete Registry's 'Configuration\Slot n' section each time there's a change of card.
Add same functionality to conf.ini.
LoadConfiguration(): load from the new Slot-n section (or otherwise the old legacy key).
Only update Registry's 'Starting Directory' for s6,d1.
Update help doc.
2021-08-29 11:39:51 +01:00
tomcw 3fece5e621 Minor interface change to PropertySheetHelper 2021-07-29 13:31:33 +01:00
Andrea 4f45202baf
Save full pathname to registry. (#960 PR #959)
This was already happening for Hard Disks (although in a convoluted way).
Extend to Floppy Disks.
2021-07-13 21:24:29 +01:00
Andrea d631b23d24
Uthernet: fix usability and settings (PR #947)
* Make Uthernet settings behave like all other cards.
Fix as well the fact that the Uthernet interface would not be reapplied after a restart.

* Uthernet: use consistent types to reduce code complexity.
Use std::string everywhere.
2021-05-19 21:44:33 +01:00
Andrea f959f4f1d6
Uthernet: enable support on Linux. (PR #943)
* Make tfe easier to compile in Linux.
* libpcap in Linux: we can just use the libpcap provided and link to it directly.
2021-04-23 20:59:02 +01:00
Andrea 8c2b38d19d
Enable ConformanceMode in VS2019. (PR #923)
This reduces the chances of incompatibility between gcc and vs.

99% is "const char *" literals.
1 case of a goto jumping over a variable declaration (but it is not needed).
2021-02-10 21:05:00 +00:00
Andrea 466207f5d3
Save-state: load/save dialog: Remove ; to concatenate string and avoid unused code. (PR #924) 2021-02-10 20:55:58 +00:00
Andrea baad40f3b8
SpkrSetEmulationType(): simplify logic and remove unreachable code. (PR #919) 2021-01-20 21:30:34 +00:00
Andrea cdf1cb9106
Remove usages of g_hFrameWindow and g_hInstance from core emulator files. And Resource related Win32 functions. (PR #915)
. Win32Frame: remove WM_USER_RESTART.
2021-01-19 20:37:43 +00:00
Andrea 816e22524f
VideoReinitialize(): remove default arg & refactor out common code (PR #911) 2021-01-13 22:02:48 +00:00
Andrea 6cffb30330
FrameBase: some changes to ease implementations (PR #910)
. simplify the interface FrameBase to make it easier to implement it for different cases (remove HDC and make parameters more explicit)
. remove functions which are only called on a Win32Frame (in which case a cast is guaranteed to succeed)
. otherwise there is the risk that every FrameBase implementation wants to add its own variants.
. FrameBase::FrameRefreshStatus() simplify implementation: pass all flags explicitly
2021-01-10 16:33:06 +00:00
Andrea 159cde7d64
Video & FrameBase: better split (PR #908)
* Video / FrameBase: move arch specific code to FrameBase.
* Video::Initialize & SetFrameBuffer.
Ensure initialization and SetBuffer can only happen in the right order.
* Video: move virtual functions to FrameBase.
With these changes all the virtual functions are in FrameBase and Video gets closer to be (only) the Apple ][ Video device.
* Move a few more functions from Video to FrameBase (snapshot related)
Now, the inclusion is one way with Video *not* including FrameBase.
* FrameBase::VideoRefreshScreen move Video related code to Video.
And only leave management to FrameBase.
2021-01-03 16:21:24 +00:00
Kelvin Lee 0139878dd7
x64 enabling (PR #747)
Here are a few changes to make 64-bit build possible.
The changes are mainly to use windows api in the correct way that works for both 32-bit and 64-bit builds.
2021-01-01 12:57:40 +00:00
Andrea 9d7aa7d309
Move VideoRedrawScreen() to Video. (PR #904) 2021-01-01 12:42:24 +00:00
TomCh 3aa5750dcf
Make Video.cpp and WinVideo.cpp into a dependent class hierarchy (PR #898)
. class hierarchy: WinVideo IS_A Video (ie. WinVideo is a subclass of Video)
. GetVideo() singleton instance of WinVideo in AppleWin.cpp, exposed via Interface.h
2020-12-28 16:25:29 +00:00
Andrea e27879ac99
Move interface into a class FrameBase. (PR #893)
. Move the Win32  implementation into Win32Frame.
2020-12-24 15:08:50 +00:00
Andrea 2d2ba86f4f
IPropertySheet: make it a standard C++ class with pure virtual functions (PR #892)
* Interface.h: ensure that functions in the interface are not exported by other header files.

This is generally harmless, except for the presence of default arguments, in which case the version with default arguments must come first.
To avoid the issue, these functions are only ever exported in the Interface.h header file.
2020-12-20 15:32:51 +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 93346c215f
Cleanup types and include's to ease GCC compilation. (PR #881)
. Do not include alarm.h as it is not needed.
The code in alarm.h is not complete: all the extern functions are missing and different linkers might complain about this.

. Do not redefine some windows.h types in VICE/types.h as it becomes harder to keep them consistent.
Biggest problem is DWORD_IS_LONG as the best way to define it in linux 64 bit is as an int. Prefer to use StdAfx.h.
2020-11-29 17:22:50 +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
Andrea c455488b50
Split Frame.cpp to WinFrame.cpp (PR #874) 2020-11-23 19:21:20 +00:00
Andrea 2a7191f5ce
Split Video.cpp to WinVideo.cpp to remove most of the Win32 specific functions (PR #872)
. Moved DirectInput.cpp/h and WinVideo.cpp/h to a new "Windows" folder.
2020-11-21 20:57:56 +00:00