CHANGES
=======

13 Mar 2003
===========

General source code tidy -- rearranged files and removed stale #defines.

Undefined BEEB_UNSIGNED. (Sound sounds great now, apart from Speech.)

Removed DirectXLib from the project.

Added all remaining SY6502A undocumented opcodes.

Added illegal opcode checker struct to make sure there were none remaining.

Fixed HLT -- it works as on a real 6502.

14 Mar 2003
===========

Updated FS -- fixed Imogen and Elite.

Fixed VIA error (DDRA/DDRB reads wrong way round) -- fixed Codename: Droid.

Fixed sound error -- samples_per_switch_ if <1.f should be set to 0 not 1!
Fixed Speech and samples -- now work OK without BEEBSOUND_UNSIGNED.

Shortened sample buffer to 1/25sec for reduced latency -- OK down to 1MHz
(just about :), fine at 2MHz.

Fixed INX/INY/DEX/DEY timing. Sphere of Destiny track looks a lot better,
though generally still bad and the keypress problem remains.

15 Mar 2003
===========

Added Quick start feature.

Changed FsDrive::Init and FsFile::Init to use C rather than C++ RTL --
much much faster in debug build.

16 Mar 2003
===========

Fixed up Quick start feature.

Added FS force boot thingy so it all works :)

17 MAR 2003
===========

Tested 272 games.

Trying to fix Elite. Added white line on screen to indicate SysVIA T1 timeout.
Changed location of '++cur_scanline_' in video update -- now vsync is held for
the correct number of scanlines. (Still doesn't work, though!)

Revs goes wrong if left...

New VIA stuff:

1. Changed VIA update
to fire timers if <-1, because timers don't go to <0 until -2 (being 1MHz).

2. Fixed up VIA C[AB][12] interrupts -- they aren't cleared by a input that doesn't
conform, and the IFR doesn't change when the pin is in output mode.

3. update doesn't attempt to make sure timers >0 afterwards

18 Mar 2003
===========

FIxed cycle wrapping. Emulator runs for >~15 emulated minutes. Revs seems OK,
cycle wrap caused hang so it wasn't that...

'Monitor' syncs to any frame with between 310 and 320 scanlines -- Magic
Mushrooms works.

Added flashing colours.

"Fixed" keyboard (I think) -- keystates weren't being updated if write enabled,
but Gary Partis games seem to enable it for write mostly and only for a bit
enable it so it generates CA2 if anything pressed -- added var so that irqs
delayed like this will work. Might generate too many irqs though? Fixed
Syncron, Sphere of Destiny without breaking anything else. Lode Runner still
wierd.

19 Mar 2003
===========

Fixed video.

Added cursor (needs resync sometimes).

Spycat still broken -- seems extended vector table gets somehow bollocksed, ends up doing a
BRK in completely the wrong place :( see spycat-fucked.txt:

13708609 -- does OSCLI for "L.SCREEN 3000"
13711894 -- tries to do OSFILE, but it goes wrong!

19-22 Mar 2003
==============

Gave up smoking, but despite this managed to force myself to:

Fix Spycat, it needed *DISK (durr) -- this fixed Pipeline too.

Dump local filing system, it is something worth coming back to though.

Write 1770 emulation, hey it WAS easy after all!

23 Mar 2003
===========

NEw File optnios for 1770 emulation -- Save/Save As not yet done.

Fixed a couple of UI bugs.

Separated Beeb1770 and BeebDiscDrives.

Fixed dumb bug whereby unmapped Beeb keys would always be unpressed -- this
was cocking up the keylinks, which now work aye grand.

Fixed QuickStart for new disc emulation, yay works great.

Fixed bug in sound -- old play cursor was being updated even if the old one
hadn't been used. Speech! is still a bit iffy, though, might be OK on P4?
[Postscript: it isn't]

24 Mar 2003
===========

Added in the OS patch to reread keylinks on any reset -- seems to work.

Screen is 272 high and vsync goes to -32 always, yay 2 options down :)

Fixed the like _totally_ broken 1770. (IRQ+NMI at the same time would lose
NMI.) Now works fine, loads quicker too.

Code for 8/15/16/24bpp bit depth drawing -- just needs the DISPLAYCHANGING
message and more DirectX start/stop stuff.

25/26 Mar 2003
==============

Surfed the web an awful lot.

Display change detected.

Neatened disc select menu.

Emulator detects display changes seemingly correctly. Now works in all
bit depths.

VideoSystem screen buffer now configurable, menus adapt to suit.

Rejigged the keyboard system. Still Lode Runner is fucked!

27-29 Mar 2003
==============

Added zlib and minizip for using disc images in ZIP files. UI altered to
suit. TODO the code for this is a right mess.

Removed all file system use from BeebDiscDrives -- requires file contents
as vector<byte>. Removes need for constant to-and-fro on error, removes need
for host system to support fopen/fread etc. (PS2), removes need for beebm_base
to cater for host's preferred compression method (.gz vs .zip etc.).

Wrote basic README, how tiresome.

30-31 Mar 2003
==============

DSD support. (Untested.)

Removed "Save as..." for drives -- Save only now.

Removed name management from BeebDiscDrives. Host must now keep track
of filenames and suchlike.

Speech mysteriously unbuggers itself before going pete tong again...

Neatened code for loading discs. I can look at it after eating something
that I really like.

8 Apr 2003
==========

cleaned up all win32 disc image handling code, now all the look-in-zip-file and
is-it-dd-or-sd etc. is in one place. Or at least, in one file.

9 Apr 2003
==========

Fixed for VC7 compile -- just load into Vs.Net, say "Yes to All" regarding
conversion, compile and go. Seems to work.

Fixed memory overwrites relating to video cursor & a possible 1-byte overwrite
when rendering generally -- "<=" rather than "<"! (Might still be some related
problems left though.)

Fixed saving of window position.

Stole code from UtilLib for stack tracing etc. Doesn't work yet.

11 Apr 2003
===========

Fixed up key map selection from menu. Not very neat. Works correctly.

14 Apr 2003
===========

key map definition.

18 Apr 2003
===========

altered COM method invocations to use CINTERFACE rather than ->, for proposed
testing of entire package with gcc-mingw. (added twRefCountPtrCom to deal with
this -- as twRefCountPtr, but uses IUnknown_AddRef/IUnknown_Release macros.)

Created nasty scons build system.

Fixes for compilation under gcc:

beebm_base:

* introduction of t65_COMPILER
* Removal of pointless specializations of InstrJSR/InstrRTI/InstrRTS -- these
  were only to prevent typos and aren't strictly required. (Also affected
  IOP6502::MyInstrRTI.) -- TODO could reinstate this by specializing entire
  struct rather than just Execute (don't think it's really required, though.)
* Changed template paremeters for t65::OpcodeTable
* BBCMicro::Update isn't inline any more -- xrefs too much for gcc, quite wise
  i think as it was something of a mess!!
* Added t65TYPENAME in about 10,000,000 places.
* rearranged some #include to make it work:
	*	BBCMicro.h doesn't require SystemVIA.h/UserVIA.h/VIA.h
		(removed BBCMicro::SetKeyState/KeyState/DoKeyboardIrq -- must use SystemVIA::
		equivalents now.)
* removed all "using t65::byte" at last.
* Added out-of-line specializations for BBCMicro::ReadByte/WriteByte

19-22 Apr 2003
==============

Gave up (for now) on gcc compilation; just too much to do.

Added support for DirectX3 (#define DX3_ONLY, new build config 'Win32 -
Release DX3') so it will work on NT4 and Win95.

Added DxInput class, used by keymap dialog and main emulator.

Keymap dialog allows pc keys to be set by pressing a key.

Keymaps are saved correctly.

Added configurable hz/bitrate/length of sound buffer.

==============================================================================
win32 port dropped
==============================================================================

23-24 Apr 2003
==============

Decided that port to wxWindows would be easier than rewrite. Now uses
wxWindows for UI and a teeny tiny portability layer for keyboard input,
graphics and sound.

wxWindows now handles ZIP files, windows, config, etc.

Emulator still runs at the same speed. (To be tested on Pentium II.)

TODO Sound, UI, etc. :)

25-29 Apr 2003
==============

Grappled with wxWindows bugs.

Sound.

Most UI -- Quickstart, options.

TODO: keyboard dialog.

29-30 Apr 2003
==============

Quickstart finished

ROMS config dialog (not finished just yet)

All dialogs to be made modeless!!

TODO: restart DirectDraw if stuff lost; currently it doesn't handle
resolution changes.

1 May 2003
==========

ROMS config dialog seems to work.

Stick with modal dialogs

Sound dialog done.

TODO Speech! doesn't work in stereo... wierd.
TODO Disc 'unmount' option doesn't work.
TODO track down mysterious disc faults.
TODO 'inhibit_idle_' should be called 'beeb_paused_' or something.

3 May 2003
==========

Keyboard dialog almost done.

Added disc save and unmount stuff.

Keymap selection done but untested.

Fixed CPU/VIA interaction. (Seems to match real Beeb!)

TODO T1H isn't right on overflow. (Not FF, but value in T1L-H.)
TODO drive menus not updated properly on Quickstart.

4 May 2003
==========

Further CPU/VIA tweaks. T1 at least is (should be) identical to a real
Beeb. Yay!! (T2 untested. Probably won't work.)

Optimisations to VIA::ScheduleNextStop -- if a timer underflow won't
cause an interrupt (one-shot and shot), it's not considered. Free run
with latch of 0x0001 is still rather slow :(

6 May 2003
==========

Add alternaitev disc interfaces. Acorn 1770 DFS works.

Attempted to get Opus Challenger emulated. RAM Disk seems to work. Floppy
disc emulation is broken unless seek commands don't do an NMI. This is
contrary to what the datasheets say, and indeed Acorn 1770 DFS if seek doesn't
result in an NMI.

TODO remove constant clearing of memory buffer in video update. (make configurable)
TODO remove hack in DoBeebTick (checking for CHALLENGER setting up NMI routines)

6 May 2003
==========

Hmmm, Frak went wrong somewhere :)

Changed next_stop handling to cater for irqs. It's possible to request an IRQ
stop now. This will be submitted as a stop point only if IRQs are enabled (I
clear); if I is set, it will be ignored.

Note to self: justifications:

* Once I is reenabled an update occurs, so anything pending will happen.
* Polling VIAs involves an Update() call so even if updating isn't happening
  the correct values (IFR in particular) will be read.
* The video and disc systems always stop, so worst case is the VIA updates are
  quantized like on the old emulator.

Hurrah!!!

8 May 2003
==========

Fixed Challenger emulation. (I think!)

Rejigged 1770 stuff, it's now a teeny bit neater.

12 May 2003
===========

TODO test save keymap dialog layout.
TODO save only used tracks on a disc...???

Other than that, mostly done. I think.

Possibly TODO:

*	One-press screenshot taking (UI!!... probably not...)

13 May 2003
===========

Added initial Watford 1770 emulation. Doesn't work :( [V Strange!]

Fixed quantization of NMIs with interrupts disabled -- was always running
until next stop rather than NMIing immediately. This could be the disc fault
thing actually -- missing the odd NMI because it's unasserted too soon.

Fixed further 1770 bug -- it wasn't resubmitting its next stop point on each
update, further buggering things up!

14 May 2003
===========

Fixed Watford DDFS by inducing a 10 byte sector-to-sector delay, based on its
use of a LDY#&60:.LP%DEY:BPLLP% type loop after the last byte.

BeebDiscDrives/Beeb1770/BeebFrame now support all drives 0-3.

Think the other DFSs still work. Acorn seems to read sector register so that
is updated during reads and writes. Added more phys_track/phys_sector updates.

15 May 2003
===========

Better disc insertion UI.

Quickstart detects pairs of single sided discs making up a double sided one.

Neatened code that relates disc format to file name.

16-20 May 2003
==============

VIA FF hack

cleaned up a load of code (new names for everything)

status bar, sizer use in mbMainFrame

Arsed about trying to get the f**king 1770 working properly for everything.
Still Watford DDFS is boloxed!!

20 May 2003
===========

Fixed 1770 (properly fixed??)

'fast forward on load' option

21 May 2003
===========

Fixed speed limiting *slap*

Added VIA debug panels

22 May 2003
===========

Fixed Quickstart directory recursion

25 May 2003
===========

Rejigged a bunch of stuff for multiple BBC models (B+ M128 etc.) -- better
separation between beebm_wx and beebm_base too.

Should all work as before!

25 May 2003 (later)
===================

B+ support (no config though).

Fixed the broken Rocket Raid -- see BeebEm comment about it in 6502core.cpp
(same problem).

Added support for spoecifyng alternative ROMSEL handling, for Master/B+/B
emulation. Not very neat, because all alternatives must end up in 'bbcComputer',
alternative is external meddling in bbcComputer innards to do all the paging...

26-27 May 2003
==============

Added 'show all' and 'log video' stuff

Fixed 1770 emulation (again!) -- status register doesn't clear NMI

command line options

BBC model selection in config file

current screen address is updated rather than calculated as
(base+R1*8+line), fixed "Alien From Outta Space"

TODO fix Sphere of Destiny! (src/dis/sod2.txt, have since added cycle
count tag for "this->T1()" type messages but this text file shows the
problem... somewhere...)

Sphere of destiny is broken because (I think) system VIA T1 and the vsync
are exactly in sync. T1 is cycle exact (mostly) but the vsync relies on the
granularity of calls to bbcVideo::Update. Should SetNextStop for system via
CA2 so that it is exact.

29 May 2003
===========

twArgs proper

TODO command line options for Quickstart/Mount...
TODO add default size for ROMs dialog...
TODO save and restore size of main window...

TODO Rationalise installation of custom mmio functions, use same scheme
for different disc interfaces as for different models etc. -- also
disc write should be in bbcDiscInterface and forwarded to 1770 etc. etc.

30 May 2003
===========

TODO mbConfig should load from wxConfig not just from wxString, to allow
overriding from command line options etc.

TODO mxConfig should also save to wxConfig.

TODO document possible use of $ and % for environment in INI files.
	(actually wxWindows doesn't do this it turns out!)

TODO a bunch of other stuff!!

1 Jun 2003
==========

sound record.

misc command line fixes and a bunch of other rubbish.

2 Jun-11 Jun 2003
=================

see changes.txt

TODO always on top: set SYSTEM MODAL
(see http://www.codeguru.com/dialog/TopDlg.shtml)

15 Jun 2003
===========

Initial Master 128 stuff. No way even close to complete!

TODO ensure all opcodes are done -- extra BIT modes are not yet present.

18 Jun 2003
===========

fixed saving of window positions when minimized/maximized.

Enhanced status bar.

Added vertical 2x menu option.

TODO full screen, just fix at 800x600x8 and use vertical 2x to determine
whether to scanline double or draw alternate lines like DOS version. Flip
back to windowed mode on Alt+Tab or anything remotely unusual.

TODO CAPS LOCK and SHIFT LOCK leds!

19 Jun 2003
===========

Basic full screen mode.

TODO hotkey for toggling full screen and windowed modes.

TODO status bar type affair for full screen mode. Speed + drives is all.

20 Jun 2003
===========

Full screen mode works, mostly...

UI for scanlines modes

Fixed status bar still appearing in full screen mode, dunno what that was
about!

Added full screen refresh rate configurability.

TODO: COming out of full screen is a bit dodgy. Sometimes the window gets
resized and ends up massive. Generally the focus is a bit orf -- the beebm
window has focus, but DirectInput doesn't respond, saying later "Auto
acquire after iconization" (or something). Probably best to do manually
what wxFrame::SetFullScreen does.

TODO: set up VideoSystem so a fixed mask may be ORed to all pixel values
written to display. This way, can leave most of palette blank enabling
status bar (and menu??) to be displayed in full screen mode. Obviously
mask will be 0 in windowed mode, possibly (say) 0x20 in full screen etc.

21 Jun 2003
===========

TODO: GetPalette, fill in entries, SetPalette -- should work. Also options
for visibility of status bar and/or menu bar in full screen mode. Disable
status bar size gripper in full screen mode. Add button to status bar for
leaving full screen mode if menu is disabled. (Alt+Tab is always available
if status bar is invisible.)

23 Jun 2003
===========

Full screen fixed, for good I hope, though the code is mucky and needs
fixing (TODO non-asynchronous fs/windowed switch, and better error
checking.)

TODO SYSTEMMEMORY/VIDEOMEMORY INI file setting.
TODO class-ify Host stuff, better off C++ anyway to allow use of wxWindows
stuff.

27 Jun 2003
===========

corrected missing 'return' in HostGfx_StartInternalWindowed, which I guess
was why emulator was hanging up if out of video memory.

only uses 1 back buffer in windowed mode -- slight speed loss, none dead.

TODO fix memory leak for popup menu.

TODO create as many back buffers as possible, up to 'num_back_buffers' of
course.

7 Jul 2003
==========

Fixed misc cosmetic problems in full screen mode.

TODO exiting in full screen then restarting and returning to windowed mode
doesn't work at all...

8 Jul 2003
==========

Full screen entirely OK, I think?
