Commit Graph

148 Commits

Author SHA1 Message Date
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
tomcw
c79abb45eb Renamed DirectVideoInitialize/Destroy() to WinVideoInitialize/Destroy() 2020-11-21 21:13:21 +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
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
tomcw
cfe482cd52 NTSC: fix rare crash in NTSC_SetVideoMode() after a VM restart 2020-10-11 21:29:26 +01:00
tomcw
1a11c65d37 Replaced global g_CardMgr with a singleton object & GetCardMgr() call. (Fixes #843) 2020-10-11 17:34:44 +01:00
TomCh
6125c2b12d
Support for synchronous events (PR #841)
Switched Mockingboard/6522 Timer interrupts & Mousecard's VBlank interrupt to use synchronous events.
This is a linked-list of ordered timer-based event, where only the head of the list needs updating after every opcode.
2020-10-11 16:08:05 +01:00
Cyril Lambin
08458a9d29
Extended support for RGB cards (#819) (PR #837)
Video mode: "Color (RGB Card/Monitor)"
. RGB HGR rendering (no half-dot-shift, no vertical blend)
. RGB DHGR rendering
  - Color 140-mode is a real 140x192 mode with no color fringe (Video7 patent, shows that way on real hardware)
  - Mixed mode: correct transition for Color 140-mode <-> B&W (validated on a real IIc adapter.)
. Complete Féline support (eg. 2 distinct greys)
. Fixed Video7 SL7 inverse text
. Fixed DHIRES mixed mode detection
. NB. Prince of Persia will switch to B&W (560-mode) when going from HGR back to DHGR (same on real hardware).

Video mode: "Color (Composite Idealized)"
. Previously this was "Color (RGB Monitor)" (and before that, the AppleWin 1.25 "Color (Standard)")
. Now this mode does not support the extra RGB cards' video modes
2020-09-27 14:09:02 +01:00
tomcw
039ad8a547 Small refactor for app window's title 2020-08-17 19:26:06 +01:00
tomcw
221e35edc7 Changed app window's title to reflect NTSC or PAL for 'Color (xxx Monitor)' 2020-08-17 18:29:18 +01: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
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
97e73c632d Full-speed: new VideoGetVblBarEx() required when called from main loop 2019-11-11 19:55:46 +00:00
tomcw
20b8515b7b Full-speed: Only redraw video screen during VBl (support VBl in full-speed) 2019-11-10 23:52:29 +00:00
tomcw
4ad0923399 Fix video tearing by only updating during the Apple II VBL (#711) 2019-11-03 15:05:28 +00:00
Andrea Odetti
f5f60310c1 More std::strings.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-09-07 09:02:39 +01:00
tomcw
2f6b24b970 Fixed up the Debug/Release NoDX configurations 2019-09-01 11:28:24 +01:00
tomcw
fe375534cf NTSC: Commit to the improved TV modes. (#650) 2019-08-31 15:02:32 +01:00
tomcw
bad963026c 1.29.1.1: test improved TV modes for #650. Use Ctrl-9 to toggle 1.29.1.0 and 1.29.1.1. 2019-08-30 21:58:03 +01:00
tomcw
b54fc8a058 Reverted 8a11feb7 (#650) - missed a bit! 2019-08-26 15:56:34 +01:00
tomcw
521a09e75a Reverted 8a11feb7 (#650) 2019-08-25 19:41:30 +01:00
tomcw
2f52206e1e Merge branch 'master' of ssh://github.com/beevik/AppleWin into beevik-master 2019-08-25 17:18:23 +01:00
tomcw
e09cd21703 Added experiment code for DirectDraw & WaitForVerticalBlank() - #680 2019-08-25 17:07:08 +01:00
tomcw
8a11feb739 NTSC TV video modes: adjust y-position by 1 pixel (#650) 2019-08-09 22:58:12 +01:00
Brett Vickers
9e5e21b8c9 Prevent uninitialized value bugs and improve string safety.
This change does two things:

1. Updates the registry APIs to reduce the likelihood of uninitialized
variables.

The code wasn't always checking the return value of registry load operations.
In some cases, this led to uninitialized memory being used, and crashes could
result. For example, LoadConfiguration in Applewin.cpp was using an
uninitialized value for the computer type if no registry variable for the
"Apple 2 type" was set.

New registry reading methods and macros have also been introduced, allowing
default value fallbacks for the cases where a registry variable is not found.
This makes registry access simpler and safer when a default value is known in
advance.

The registry code's style has also been updated to conform with the rest of
the code base (tabs instead of spaces, naming conventions, etc.)

2. Introduces string safety improvements.

A number of code paths have been modified to use safe-string functions instead
of their unsafe counterparts (e.g., strcpy, sprintf).  In the process, some
strings were converted from "char" to "TCHAR". This was done mostly for
consistency with the rest of the code-base.
2019-08-09 13:38:50 -07:00
tomcw
73ce127eef Removed some old commented out code 2019-06-29 17:05:07 +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
dbcb789442 Don't delay a PAGE1/2 video mode change (#656) 2019-06-24 22:05:32 +01:00
tomcw
e6e52ffcf4 Delay any video mode change by 1 cycle (#654) 2019-06-15 18:15:00 +01:00
tomcw
d6f8d4edd8 Rename sg_DiskIICard to sg_Disk2Card 2019-04-14 17:01:49 +01:00
tomcw
4235f08f7a Remove the 'Disk' prefix from method names 2019-04-08 10:41:47 +01:00
tomcw
e7d6eac04d Class-ify disk.cpp into DiskIIInterfaceCard 2019-04-07 14:22:05 +01:00
tomcw
ffa41e35cc Added test cmd-line switch: -screenshot-and-exit <file.bmp> 2019-03-17 15:01:51 +00:00
tomcw
8c7d45bd8e Fixed occasional flicker when changing video mode with F9. (Fixes #611) 2019-03-16 14:27:40 +00:00
TomCh
082b22d753
Support vertical blending for 'RGB (Color Monitor)' for hires (#616) (PR #624)
Support the old AppleWin 1.25 vertical blending for hires:
- extended Config dialog to include 'Vertical Blend' checkbox
- Persist 'Video Styles' to Registry
- new cmd line options to select this style & also select 'RGB (Color Monitor)'
- code refactor to support enum VideoStyle_e (and replaced g_uHalfScanLines with a bit in g_eVideoStyles)

Bumped version to 1.28.2.0.
2019-02-24 15:59:35 +00:00
TomCh
dd53812132
Support for AppleColor / Video7 DHGR mixed mode (#523) (PR #620)
Supported modes selected via toggling AN3 and clocking in 80COL:
- 140 color mode (Apple calls this mode 2, Video7 calls this mode 0).
- mixed mode (Apple calls this mode 3, Video7 calls this mode 2).
- 560 mono mode (Apple calls this mode 1, Video7 calls this mode 3).

Save-state is also persists the extra state.

And there's a few corrections to APPLE2E.SYM for the 80STORE and 80COL I/O addresses.
2019-02-02 15:51:27 +00:00
TomCh
25c7c41b07
Reinstate support for old AppleWin 1.25 "Color (Standard)" video mode (#357) (PR #614)
Renamed this video mode to: "Color (RGB Monitor)"
Also renamed "Color (Monitor)" to "Color (NTSC Monitor)".

As for the colours: I've changed them from the original 1.25 colours. Instead I runtime-generate the colours from the NTSC code. See NTSC.cpp's GenerateBaseColors(). This shifts the same 4-bit pattern in, combining with NTSC color phase, until the colour stabilises. Then I average the next 4 RGB values to get the final colour. The reason for this is that we now have consistent colours between NTSC and this simplified rendering mode.

NB. The 2 greys (in GR,DGR,DHGR) are now the same RGB value.
2019-01-09 21:29:36 +00:00
tomcw
eea8cb3cdf Deprecated and removed support for v1 save-state. (Fixes #603) 2019-01-05 22:20:51 +00:00
tomcw
af899fa90a Added support for Apple II/II+ 2K video ROMs (fixes #205) 2018-11-19 22:15:04 +00:00
TomCh
aa59c71847
Add support for PAL/European or custom 8K video ROMs (#596)
Added new cmd-line switch: -videorom <file> to replace the video ROM for the Enhanced //e.
- Support video ROM sizes of 4K, 8K and 16K (top 8K only).
- NB. The rocker switch is set to European video ROM.
F10 (for //e or Enhanced //e models) emulates the PAL //e's rocker switch (under the keyboard) to toggle between European or US video ROM.

Other:
- Fixed debugger's view of the AltCharSet soft-switch (it was showing the opposite state).
2018-11-17 16:29:17 +00:00
tomcw
7d100a349b NTSC: Merge-squash from 'GH555-1-pixel' branch for the 1 pixel shift for 14M video modes (#555) 2018-09-09 13:56:55 +01:00
tomcw
bd7a96ce6e Small refactor of VideoGetScannerAddress() 2018-08-06 19:06:28 +01:00
tomcw
d623533e06 Improve VideoGetScannerAddress() to generate NTSC tables; and check tables with all video cycles 2018-08-05 22:19:51 +01:00
tomcw
5e02eaee53 Use VideoGetScannerAddress() to generate the NTSC video lookup tables 2018-08-02 22:37:20 +01:00
tomcw
9cacf8d90d Small refactor for reading $C01x soft switch status flags
Prevent Apple II from reading $C01x/$C07F soft switch status flags
2018-06-30 14:30:30 +01:00
tomcw
2d2304b4c6 AppleWin's Config>Benchmark, reported a "Pure CPU MHz" which was not a good indicator of unthrottled speed for v1.26+, as it was still getting the emulator to do full NTSC/cycle-accurate video update. The reality (when in full-speed/unthrottled mode) is that the video is only refreshed at 16.6ms (wall-clock).
So added a 2nd "Pure CPU MHz" for full-speed (ie. no video update), eg:

---------------------------
Benchmarks
---------------------------
Pure Video FPS:	2860 hires, 2868 text
Pure CPU MHz:	10.3 (video update)
Pure CPU MHz:	241.3 (full-speed)

EXPECTED AVERAGE VIDEO GAME
PERFORMANCE: 476 FPS

(ref: #424, #540)
2018-03-03 22:01:03 +00:00
tomcw
552d8fcc7b Remove old debug timing code (#540) 2018-02-26 21:34:01 +00:00
tomcw
6c031e7930 Disk II: changing 'enhancedisk' doesn't cause a restart + added accessors (fixes #546) 2018-02-25 15:09:25 +00:00