Commit Graph

63 Commits

Author SHA1 Message Date
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
tomcw
c277c5152d Fix a few medium Coverity defects:
1514566, 1063811
2022-02-26 20:23:00 +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
48dd638d33
Synchronize Linux build. (PR #1037)
. remove OutputDebugStringA()
. push changes to StdAfx.h
. mention g_strSaveStatePathname in the error message for loading save-state
2022-02-14 20:37:18 +00:00
Kelvin Lee
9a3832084a
Simplify the common combination of sprintf() and OutputDebugString() (PR #1031)
- Update LogOutput() and LogFileOutput().
- Add StrFormat() to produce std::string out of snprintf() & add StrFormat.cpp to projects.
- Add PTRDIFF_T_FMT in parallel to SIZE_T_FMT to StdAfx.h, for completeness.
- In Log.cpp, changed to get timestamp using posix functions.
- Removed TCHAR usage throughout - simply use char.
2022-02-13 21:37:05 +00:00
tomcw
83e56924f7 WM_CREATE: remove CpuCreateCriticalSection(), since done in SY6522.Reset() 2022-02-13 12:37:33 +00:00
tomcw
b519031de4 WM_CREATE: call CpuCreateCriticalSection() instead of CpuInitialize() 2022-02-12 19:11:34 +00:00
TomCh
f7c6ef397c
Split 6522 out of MB code and into own class (PR #1028)
NB. Update CpuInitialize() & CriticalSection creation:
. call CpuInitialize() on WM_CREATE to create CriticalSection
. needed as MB_Initialize() needs CriticalSection
2022-02-05 18:48:36 +00:00
Andrea
d63e406573
Correct BMP creation on Linux (PR #1014)
Enable BMP Header packing on all compilers.
Add virtual function to FrameBase to select where to save screenshots.
2022-01-03 14:41:03 +00:00
tomcw
a243efc74b Fix for cmd line -dcd not being honoured (regression) 2021-12-24 20:58:04 +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
tomcw
1670e0dbc0 Fix for AppleWin-Test:
. don't load floppy/harddisk images (in Registry's Config) if also loading a save-state via cmd-line.
. done to prevent MessageBox alerts when deleted disk images can't be found.
Info: Registry contains refs to disk images, but on test clean-up, the images get deleted.
2021-12-11 18:01:46 +00:00
Andrea
177c9fec05
Make Slot 0 more consistent with other slots. (PR #1006) 2021-12-11 15:26:09 +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
01f89f88eb
Joystick: Remove buttonlatch & BUTTONTIME (#1002) 2021-11-14 17:40:15 +00:00
Andrea
2e04ce348a
Add Card::Update() (PR #1000)
And use it in ContinueExecution()
2021-11-13 18:13:01 +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
tomcw
ca611eaa64 Mousecard: fix persisting card in slot-4 after a VM restart. (Fixes #993) 2021-10-19 21:56:19 +01:00
tomcw
18f5fafb30 DiskII: Remove superfluous IsDiskImageWriteProtected() 2021-10-18 21:13:37 +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
tomcw
405de2be14 Fix Coverity - High Impact defects:
. uninitialised vars in Debug & Win32Frame
2021-07-28 12:47:05 +01:00
tomcw
3d0cdd55d1 Make a few utility funcs static 2021-07-11 12:06:29 +01:00
tomcw
7086ea5208 Full-screen / resolution change: fix display flicker. (Fixes #965) 2021-06-19 15:06:04 +01:00
TomCh
1962a3c337
Switch to a static hook filter (#962, PR #964)
Remove the HookFilter.dll which had a dependency on VCRUNTIME140.dll
2021-06-09 21:48:24 +01:00
tomcw
f076986c04 Cmd line: Changed -fs-height=<best|nnnn> so it doesn't change the resolution when not full-screen (#876)
. NB. whenever switching back to non-full-screen, then it will restore the default desktop resolution.
. Allow -no-full-screen to be placed before -fs-height=<best|nnnn> (previously it only worked when placed afterwards)
2021-05-31 16:09:39 +01:00
Andrea
de7f35e6bd
Make path separator OS-dependent (PR #954) 2021-05-19 21:10:22 +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
41778aa472
Debugger: move Win32 functions to separate file. (PR #941)
* Debug.cpp: move Win32 functions to separate file.
* Move _tcscat -> strcat to maximise portability.
* Remove unneeded Win32 check.
2021-04-23 20:39:24 +01:00
TomCh
96bbc0c435
Improve SSI263 (PR #939)
New class for SSI263 (2 instances per MB/Phasor card)
- support 2nd SSI263 at $Cn20 connected to 6522-A (at $Cn00)

Switch from one-shot phoneme playback to ring-buffer
Use a new dedicated ring-buffer (distinct from the AY8910 ring buffer)
Gets rid of: SSI263Thread, the 2 events, and the 64 voices

Support the 2-bit Duration b7:6 of phoneme register for both SC01 & SSI263 (to fix #929)
Updated save-state
Updated IRQ logging (output cycle & 6522 source)
2021-03-23 22:01:41 +00:00
tomcw
2f4bbd2b8a Avoid ASSERT from MB_Reset() on exit 2021-02-15 21:47:21 +00:00
tomcw
4e88163430 MB/6522: better reset support - only ACR,IFR,IER affected 2021-02-13 16:56:29 +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
TomCh
daa0675694
Pravets refactor: move all specialisations into new Pravets class. (PR #914)
Mainly for keyboard & printer specialisations.
2021-01-17 10:48:06 +00:00
tomcw
fc3a0f57ce Win32Frame: Fixes for VS2008 2021-01-16 22:13:02 +00:00
Andrea
61db149eab
Move last remaining globals from WinFrame.cpp to class Win32Frame. (PR #913) 2021-01-16 21:57:28 +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
Andrea
9d7aa7d309
Move VideoRedrawScreen() to Video. (PR #904) 2021-01-01 12:42:24 +00:00
Andrea
d0cd7ca090
WinVideo: share some generic code (PR #901)
* WinVideo: move some generic functions back to Video.

Introduce a new virtual function (VideoPresentScreen) to draw the video buffer to video memory.

* Move Win32Frame::VideoRedrawScreen() to FrameBase as it is generic.
2020-12-29 21:30:17 +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
Kevin Marty
3c6f0c1145
Add option to disable warning when PrintScreen key can't be captured (PR #891)
NB. Windows XP or higher
2020-12-27 19:21:46 +00:00
Andrea
b8296e6c9c
Frame.h: merge into Video.h. (PR #896)
. The functions GetFrameBufferXXX() have been moved next to g_pFramebufferbits.
2020-12-27 19:01:35 +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
tomcw
469f9ba807 Support disconnecting drives from DiskII Interface card: -d1-disconnected, -d2-disconnected 2020-12-12 20:49:46 +00:00
tomcw
954d7c1731 Cmd line: support -fs-height=nnnn starting in Windowed mode. (#876) 2020-12-12 18:23:23 +00:00