Skip to content

升级了一下#4

Open
leoncoolmoon wants to merge 69 commits into
hackwaly:masterfrom
leoncoolmoon:master
Open

升级了一下#4
leoncoolmoon wants to merge 69 commits into
hackwaly:masterfrom
leoncoolmoon:master

Conversation

@leoncoolmoon
Copy link
Copy Markdown

升级了一下界面

uhziel and others added 30 commits January 5, 2020 14:48
添加可用的 demo 地址
The simulator was resetting the RTC to 00:00:00 every time it started.
This change ensures the RTC is populated with the host system's time
upon initialization and whenever the simulation is started.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
This commit fixes the issue where the emulated RTC starts from a default
time (00:00:00) instead of the system time. It adds synchronization for
seconds, minutes, hours, day, month, year, and day of week.

Additionally, it resolves "error occurs when operate in flash!" console
errors by implementing bank-relative address matching for flash command
sequences (0x5555, 0xAAAA) and a universal Flash Reset command (0xF0).

The codebase line endings have been normalized to LF for consistency.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
…0040096830846

Fix RTC initialization to use system time
Replace direct matrix assignment with setKey method.
Updated text and links in the HTML file, improved UI descriptions, and changed the reset functionality to reload the page.
- Redesigned `index.html` layout to place the LCD screen behind the device frame canvas.
- Used `destination-out` composition to create a transparent hole in the device shell, providing realistic depth.
- Centered the 320px LCD within the 376px physical window with precise margin-left (20.5px) to align with the ruler's midpoint.
- Implemented hardware-accurate triangle indicators below the screen hooked to emulator memory state.
- Modernized the theme with a dark-mode "glassmorphism" aesthetic and responsive scaling using CSS transforms.
- Added persistent storage for NOR flash via `localStorage` with auto-save and a 2-second hold-to-clear reset button.
- Included `.gitignore` to prevent bloat and cleaned up development artifacts.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
…eness

- Aligned digital LCD precisely within the hardware frame viewport (15,14) with centering logic.
- Implemented Z-layering using canvas compositing ('destination-out') to create a realistic physical depth effect.
- Added dynamic hardware-accurate ruler indicators synced with emulator RTC/segment memory.
- Developed adaptive mobile landscape layout for improved usability on small screens.
- Integrated localStorage persistence for NOR flash with auto-save and secure reset functionality.
- Modernized styling with dark-mode glassmorphism and high-contrast typography.
- Cleaned up build environment and refined .gitignore.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
- Implemented dual-layer UI: device frame (top canvas) with LCD cutout revealed underlying digital screen.
- Aligned digital LCD and ruler indicators precisely with the hardware frame dimensions.
- Added a modern settings drawer with glassmorphism, theme toggling, and fullscreen support.
- Integrated localStorage persistence for NOR flash with chunked serialization.
- Added long-press (2s) reset functionality to clear persistent storage.
- Normalized line endings and refined layout responsiveness using CSS scaling.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
- Implemented a dual-layer UI architecture with a cutout in the frame canvas for the LCD.
- Aligned the 320x160 LCD to the hardware ruler midpoint (digit 5) using precise offsets.
- Programmatically mapped and rendered the 9 triangle indicators based on LCD buffer bit 7 (rows 64-72).
- Added a modern glassmorphism settings drawer with theme support (Light/Dark/System).
- Replaced `zoom` with `transform: scale()` for better cross-device responsiveness.
- Improved persistence with auto-save feedback and a long-press reset feature.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
…2081056178940676

Optimize UI layout and alignment for high-fidelity emulation
- Updated `src/keyinput.js` to map physical Backspace (keyCode 8) to virtual 'F2'.
- Refactored fullscreen logic in `index.html` to be environment-aware:
    - On devices with a physical keyboard (detected via hover/fine-pointer media queries), only the LCD screen area is made fullscreen.
    - On touch devices without a physical keyboard, the entire application is made fullscreen.
- Improved fullscreen state management by using the native `fullscreenchange` event and `document.fullscreenElement` to ensure correct layout scaling.
- Cleaned up redundant CSS and JS logic related to fullscreen transitions.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
leoncoolmoon and others added 30 commits May 20, 2026 15:42
Added drag-and-drop functionality for loading .fls files.
Refactor drag-and-drop file handling to use document instead of device element.
Update syncCalendar method to adjust year and month storage.
Added a '清除应用缓存' (Clear App Cache) button in the settings drawer to allow users to force a refresh of the application by unregistering service workers and deleting the Cache API data. This helps resolve issues with stale assets or PWA updates.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
- Implemented a 'Clear App Cache' button in the settings drawer to unregister Service Workers and clear Cache Storage.
- Introduced a multi-language (i18n) system that defaults to English.
- Added support for Simplified Chinese detection via browser locale.
- Refactored index.html UI strings to use the dynamic translation system.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
…n-5078031998310757457

Add 'Clear App Cache' button to settings drawer
- Implement immediate PWA activation and auto-reload for version sync.
- Refactor boot logic to support state restoration without CPU reset.
- Add `syncCalendar` for host-date synchronization in RAM and RTC.
- Decouple ROM/Flash loading from automatic CPU resets.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
- Implement automatic PWA synchronization by forcing reload on Service Worker controller change.
- Refactor startup sequence to support state restoration without CPU reset.
- Improve RTC and Calendar synchronization with the host system.
- Update `sw.js` for immediate activation of new versions.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
- Implement automatic PWA synchronization by forcing reload on Service Worker controller change.
- Refactor startup sequence to support state restoration without CPU reset.
- Add auto-save functionality using `pagehide` and `visibilitychange` events.
- Ensure robust RTC and Calendar synchronization on both fresh boot and restoration paths.
- Update `sw.js` for immediate activation of new versions.

Co-authored-by: leoncoolmoon <2181574+leoncoolmoon@users.noreply.github.com>
…032129700167

Improve PWA synchronization and refine emulator boot sequence
Add functions to convert between Uint8Array and Base64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants