3 Commits
Author SHA1 Message Date
Iván Izaguirre 1b563d7668 Give a2ebiten a mouse, and the review of the shared code
The mouse the frontends share is little more than a scale, so a2ebiten can have
one now. Ebitengine has no mouse events, the pointer is polled when the frame is
updated, and its position is taken on the picture instead of on the window, so
it lands on the same place whatever the size of the window is. The models with a
mouse, like desktop, are of some use there now.

A pointer outside the window stays on the edge instead of wrapping around, which
Ebitengine reports as soon as the pointer leaves the picture.

NewMixer is now NewFrontMixer, so that it does not look like the NewMixer of the
audio package. The methods that the machine calls are marked as the
implementations of izapple2.MouseProvider and izapple2.JoysticksProvider, and
the note about SDL_WarpMouseInWindow is gone: it came from the SDL2 mouse and
means nothing in a package that knows nothing about SDL.
2026-08-12 18:05:28 +02:00
Iván Izaguirre 66b5cac559 Show the drives a file can be dropped on
A file dropped on the window went to drive 1 or drive 2 depending on the
half it landed on. There was no way to know beforehand which drive was
which or what each one had inserted, and no sign afterwards of where the
file went. The machines with two Disk II cards have four drives and only
the first two could be reached.

F8 now shows a screen with one area per removable media drive, each with
the name of its drive and the image it has inserted, or EMPTY, and the
same screen appears for a moment after a drop with the drive that got the
file marked. It is a text screen of 80 columns rendered the same way the
help is, so SnapshotMessageGenerator takes the number of columns now.

The drives register with a label and tell the media they have, so the
frontends ask the machine with GetRemovableMediaDrives instead of assuming
two. The name of the media is written by the emulation goroutine and read
by the frontends, hence the atomic access.

The new frontend/shared package holds what the frontends have in common
and the emulator library has no place for: the composition of the screen
and the mapping from a position to a drive.

a2sdl reads the position of the pointer on the desktop when the file is
dropped. The mouse motion events do not arrive while another application
drags a file, so the last known position was stale and the file could land
on the wrong drive.

a2sdl3 shows the areas while the file is being dragged over the window,
which is something only SDL3 reports.

a2ebiten had no drag and drop at all, although the help it shows said
otherwise. Ebitengine hides the paths of the files dropped, but it opens
the real files and the handle tells the path back, so the images are
loaded like on every other frontend, compressed files included.
2026-08-10 21:56:40 +02:00
Iván Izaguirre 29c1762452 A page per frontend
The README listed only the SDL2 and the console frontends, and the build
instructions for all of them lived in the README. Now there is a Frontends
section with the eight of them, each linking to a page with how to build it,
how to use it and what it can not do.

The libretro pages take the frontend_ prefix as well. The feature list moves
to doc/features.md, leaving a summary in the README.

The default configuration was wrong in the two places it was written: it
listed a parallel card in slot 1 and a mouse in slot 4, which are empty and a
Mockingboard, and flags -disk35 and -hd that no longer exist. Both lists now
come from -showConfig.
2026-08-10 00:14:11 +02:00