Commit Graph

156 Commits

Author SHA1 Message Date
tomcw
e03b68b7f0 MB: removed redundant g_n6522TimerPeriod variable 2019-12-24 13:19:35 +00:00
tomcw
8567f0a651 MB: include 1-cycle 65C02 opcodes 2019-12-24 12:51:43 +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
7d38b1ba38 CPU save-state: added 'Defer IRQ By 1 Opcode' (v5) and comments for why the other state doesn't need saving 2019-11-18 15:08:59 +00:00
tomcw
b82de931a1 Fixed 6522 timer interrupt which was occurring 1 cycle late (#711) 2019-11-17 12:26:14 +00:00
TomCh
d1b595f7bd
Fix for "Mad Effect 1&2" demos (PR #725)
. 6502 interrupt delays 1 opcode when interrupt occurs on last cycle of opcode (#724).
. Only 1-cycle delay for VF_TEXT & VF_MIXED mode changes (#656).
NB. Mad Effect 1 still has a bit of flicker on Space Invader (left edge)
2019-11-16 23:49:21 +00:00
tomcw
3c6d5d1e76 Phasor: fixed noisy playback for AE's player. (Fixes #659) 2019-11-11 17:35:10 +00:00
tomcw
d4e01643fa Mockingboard: improved sound-buffer updating
. Changed to 6522.TIMER underflowing at 0x0000 -> 0xFFFF (#652)
. Changed MB_Update() to be based on cycle delta (was TIMER1 interval)
  . this improves support for small 6522.T1C interval
  . removed MB_GetFramePeriod()
  . removed overly-complex dual-timer support
. Replaced MB_EndOfVideoFrame() with MB_PeriodicUpdate()
2019-11-10 15:52:07 +00:00
tomcw
eb59c52dc4 Mockingboard: Fix initial fast (weird) music playback issue (#711) 2019-11-03 21:37:55 +00:00
tomcw
d92eca5068 Cmd line: -m and -no-mb: fix crash 2019-11-03 14:23:47 +00:00
tomcw
506a52f359 Refactor slots & allow empty slots for s1(printer), s6(disk2)
. NB. can't empty s3(uthernet) yet
2019-09-15 20:37:20 +01:00
tomcw
300494c470 Mockingboard: only do multi-TIMER1 support update when 6502 interrupts are enabled. (#685) 2019-09-06 19:59:28 +01:00
tomcw
ed9ae72778 Mockingboard: moved multi-TIMER1 support before the AY access. (#685) 2019-09-05 22:03:56 +01:00
tomcw
11323e2aba Mockingboard: support multiple TIMER1 interrupts, with one for MB reg updates (#685) 2019-09-05 20:42:34 +01:00
tomcw
d9a15c30da Save-state: fix for loading state not re-asserting pending IRQs for Mouse & SSC. (#677)
NB. Small opt to CheckInterruptSources() to explicitly test sg_Mouse.IsActive() first.
2019-08-26 20:13:52 +01:00
tomcw
94bbc5ec3d Save-state: fix for loading state not re-asserting any pending MB/SY6522 interrupts 2019-08-26 16:52:11 +01:00
TomCh
bd86088c59
Support 50Hz(PAL) (#648) (PR #658)
- Added Configuration GUI to include checkbox for "50Hz"
- Implicitly use PAL or NTSC base 6502 clocks depending on video refresh rate
- Added new -50hz and -60hz command line switches
- Updated save-state for video refresh rate

1.28.8.0: Updated version & history.txt
2019-06-28 21:34:34 +01:00
tomcw
3fbe416424 6522: Underflow on 0x0001 -> 0x0000; and FRT's period is N+2 cycles (#652) 2019-06-15 17:41:53 +01:00
tomcw
941ef46e9a 6522: account for underflowed cycles to ensure consistent interrupt period (#651) 2019-06-01 12:21:00 +01:00
tomcw
6929ad98e3 Fix for 6522.TIMER2 not setting CpuAdjustIrqCheck() correctly 2019-04-18 20:47:29 +01:00
tomcw
be81458284 Save-state: correctly stop & play Mockingboard sound buffer across save-state loading transition (#609) 2019-02-24 15:37:15 +00:00
tomcw
de3f0d877e Save-state: Better MB init for loading save-state 2019-02-24 10:49:09 +00:00
tomcw
f998c7ddb2 Save-state: Explicitly init MB SoundcardType when loading state. (Fixes #609) 2019-02-23 10:22:52 +00:00
tomcw
ceb0416bf3 Fixed 6522 & interrupt:
. Broadside needs to see IRQ within 17 cycles (6 opcodes) of 6522 counter underflowing to detect Mockingboard. (Fixes #605)
2019-01-06 16:54:54 +00:00
tomcw
eea8cb3cdf Deprecated and removed support for v1 save-state. (Fixes #603) 2019-01-05 22:20:51 +00:00
tomcw
9bc7feb37e Mockingboard: Better support for stop/starting 6522's IER.TIMERx (#567) 2018-06-20 22:13:18 +01:00
tomcw
7f478fa36c Mockingboard: Reading 6522's IER now returns 0x80|IER. (Fixes #567) 2018-06-17 18:47:57 +01:00
tomcw
598b20fb52 Refactor: Use INTCXROM instead of SLOTCXROM to be consistent with UTAIIe (fixes #419) 2018-04-06 22:36:54 +01:00
tomcw
d9accc82c5 Refactor codebase by renaming nCyclesLeft to uExecutedCycles (#540) 2018-03-03 21:27:50 +00:00
Andrea
6051bc55d0 Changes to ease code compilation in gcc. (#541)
Changes to ease code compilation in GCC.

Disk_t and HDD contain a std::string and for this reason they need a proper constructor, ZeroMemory is not guaranteed to work.
2018-02-24 15:12:40 +00:00
tomcw
e2b515de33 MB/Phasor: Wrap 6522.IFR changes inside a critical section to avoid a potential 2 thread data-race 2017-10-28 18:39:45 +01:00
tomcw
74ac2a4f22 Mockingboard/Phasor unit functions only work from an inactive state
(#320)
- Extended save-state (MB/Phasor v3) to support 'Unit state'
2017-10-27 11:10:15 +01:00
TomCh
66321febba Support Mockingboard/Phasor when polling IFR.Timer1 (#496)
* Support precise AY8910 sound-buffer filling when polling 6522 IFR.Timer1 (ACR=Free Running mode)
  - same as if using 6522 IER.Timer1 interrupt
* Support 6522's Timer2 and some code refactoring
* Bump version: 1.26.3.4
2017-10-24 22:28:22 +01:00
tomcw
297cea7d2a Support polling of Mockingboard's & Phasor's 6522 IFR.Timer1 (#496)
. Extended save-state (Mockingboard & Phasor: version 2) to support 6522 timer being active
2017-10-21 18:47:22 +01:00
tomcw
64dd4c22c2 Refactor: Rename IORead_Cxxx() to IO_Cxxx(), and use for writes too. Re-enable support for writes to NSC (which was accidently removed at 5470feb). 2017-05-21 22:06:37 +01:00
Kelvin Lee
20a1a9a884 Fixed compiler warnings about adding integer to char. 2016-12-29 11:35:09 -05:00
tomcw
cf0cd37d9e . Fixed #309: Support 6522 TIMER1 at $Cs80 as in interrupt source
. Fixed save-state v2 bug where Mockingboard's card ROM was erroneously mapped in (instead of internal $C100-CFFF ROM)
. Added Cybernoid-TimerAtC480.aws.yaml to test both
2016-09-08 22:36:16 +01:00
tomcw
5fdc879a05 Merge from branch 'NTSC_PreMerge':
1.26.0.1
. NTSC video modes (TV Color, TV B&W, Monitor Color, Monitor B&W)
. Full Screen using native resolution (not 640x480)

NB. 6502 emulation is slower now, which means disk loading (ie. full-speed) is slower.
. EG. Aztec.dsk: from F2 boot to "Press any key". (Release build, 50% "TV Color", not run in VS, VAIO laptop)
  ~4 secs: AppleWin 1.25.0.3 (built with VS2005)
  ~7 secs: AppleWin 1.26.0.1 (built with VS2008 or VS015)
2016-09-04 21:14:26 +01:00
tomcw
66e468db65 Merged in Nick's new native resolution full-screen
- old 640x480 full-screen deprecated

Fixes for:
. Logo & Debug window scaled/positioned correctly
. Buttons & disk activity (on RHS) drawn in correct position
. Crosshairs for mouse (and when using mouse as joystick)drawn in correct position
2016-07-12 22:43:31 +01:00
tomcw
e98de27039 Manual merge from master @ c798157 2016-03-21 23:48:02 +00:00
tomcw
d0243c71d7 Save-state: rename SaveHex{4|8|12|16...64} to SaveHexUint{4|8|12|16...64} 2016-03-04 21:26:14 +00:00
tomcw
33ee34b96c Save-state: SaveBool() / LoadBool() persists true,false values 2016-03-01 22:31:17 +00:00
tomcw
11789c9023 Save-state: Renamed YamlLoadHelper load-type functions to be more consistent with YamlSaveHelper functions 2016-02-24 22:38:59 +00:00
tomcw
6b07fd665f Save-state: Added save-type functions to YamlSaveHelper & use wherever saving state. Also added new cmd-line option: -load-state. 2016-02-24 21:51:20 +00:00
tomcw
37ad1ebd63 Removed redundant binary v2 save-state code
Also:
. support new CpuType independently of Apple2Type
. save-state: don't save disk track image if no disk
. save-state: re-init AppleWin internals & UI to reflect changed Apple2Type
2016-02-14 16:01:30 +00:00
tomcw
2f6e86c0fa Added libyaml 0.1.5
Added yaml save-state support for:
. Main AppleII unit
. Aux memory & RawWorksIII
. Printer
. SSC
. Z80
. Mouse
. Mockingboard
. Phasor
. Disk][
. HDD
2016-02-07 15:47:15 +00:00
tomcw
5c16c3642a Merged master to savestate branch 2015-09-13 11:39:58 +01:00
michaelangel007
81c649d621 [PVS-Studio] Fix sprintf() security warnings Bug #301 2015-07-30 09:17:34 -07:00
tomcw
9ceb95372f SSI263 speech: fix for data-race (todo: raise GH issue, since it resulted in a Win32 crash) 2015-04-12 18:17:08 +01:00
tomcw
f114a9b8fe Save-state: alloc extra 64K banks for RamWorks card if needed 2015-04-12 17:30:16 +01:00
tomcw
498f01edde New save-state (.aws) v2:
Added card save/load for:
. Phasor (#260)
. CP/M (#260)
. 80 column card:
  . aux memory now saved separately from main memory
  . extended memory (RAMworks) (#260)

Mockingboard & Phasor:
. Full AY8910 internal state now preserved.
  . needed for eg. envelope, ay_change[], etc
  . also Phasor player only updates AY regs that have changed

Other:
. On restore error, then PostMessage(WM_USER_RESTART), so that emulator not left in intermediate state
. Fix: Start Dir wasn't set when drag & dropping an image onto a drive icon or double-clicking an image file
2015-04-11 22:24:54 +01:00
tomcw
717c5cba84 New save-state (.aws) v2:
. Format now extensible for supporting new hardware types in the future
. Include missing items like Apple2Type, CyclesThisVideoFrame (#255)
Continue to support loading of old v1 format.

Added card save/load for:
. Mouse (#260)
. HDD (#260)
. Printer

Extended card support for:
. SSC

Other:
. Added save-state v1 struct size checks
. Create SaveState_Structs_v2.h and split out common into SaveState_Structs_common.h
. Refactor HardDisk.cpp to use imagehandle; and consolidate with Disk.cpp
. Fix Disk/HD_GetFullPathName() which wasn't always returning full pathname
. Consolidate common GetImageTitle() and move into DiskImage.cpp
2015-02-13 22:40:53 +00:00
tomcw
73f0e405e5 Remove wchar.h & Update VS2012 proj with new headers 2014-08-14 22:27:41 +01:00
tomcw
cbdad2a02f Qualified all STL refs with std:: to get rid of the 'using namespace std' mismatch between the main code & debugger code 2014-08-14 20:29:01 +01:00
tomcw
6a26a95487 PCH refactor: remove non-system headers from stdafx.h 2014-08-13 21:30:35 +01:00
tomcw
d591dd006b Remove the top-level AppleWin folder 2014-05-23 22:59:02 +01:00