Commit Graph

58 Commits

Author SHA1 Message Date
tomcw 78ee8101d5 Speaker: change from mono to stereo sound buffer (but left channel silent).
Possible fix for #1159.
2024-01-13 17:55:57 +00:00
Andrea 4b18918e0f
Mockingboard: define sample rate and number of channels only once. (PR #1223) 2023-05-05 21:49:26 +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
tomcw d612972e6c Add command line support for hard disk controller (hdc) in slot-5 (#1033)
. -s5 hdc
. -s5h1 <pathname>
NB. No GUI config support, so no way to plug/unplug HDDs.
2023-02-26 20:42:21 +00:00
tomcw 3abf0c1753 Cmd line: support removing cards from slot 4,5 and 7 too 2023-01-28 18:44:16 +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 a57f2b29a3 Support '-s6 diskii' and '-s6 diskii13' (#1133)
. so that a diskii card can be re-inserted into an empty slot 6
Improve command line for slots 5&6: -sN diskii and -sN diskii13
. on a restart (or change of config), if that diskii card is already in the slot then ignore
. ie. don't lose the image(s) across a restart
2022-10-06 21:18:14 +01:00
tomcw 69fa53ab7d Add command line: '-sN diskii13' to force the diskii card (in slot-N) to use the 13-sector firmware (#1133) 2022-10-05 21:29:57 +01:00
tomcw 4a7f05ed36 Full-screen: Retain uniform x and y scaling, unless user specifies a full-screen resolution (#1121) 2022-09-24 17:13:09 +01:00
tomcw c9f5df1e1e Fix typo in log msg 2022-07-02 16:59:03 +01:00
tomcw 3ab80d9b9c Command line: support '-s2 ssc' 2022-06-26 19:06:39 +01:00
TomCh de173b2729
Support two adjacent phases turned off in rapid sequence (#1110, PR #1116)
Fix for A2osX low-level format for 48-trackl, 192K floppy image
2022-06-20 20:40:39 +01:00
tomcw 1b80c7bf16 Debugger: change search path for DebuggerAutoRun.txt
. try CurrentDir first, only if this fails then try AppleWin's ProgramDir.
Also: defer DebugInitialize() until later so it can take advantage of -current-dir command line switch.
2022-06-06 19:46:10 +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
tomcw 08c730c647 Cmd line: add -wav-speaker <file> & -wav-mockingboard <file> 2022-04-17 16:23:51 +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 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
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
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
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 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
Andrea 61db149eab
Move last remaining globals from WinFrame.cpp to class Win32Frame. (PR #913) 2021-01-16 21:57:28 +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 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