Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise the 127-icons-at-once limit for displaying files #233

Open
c0mmander8 opened this issue Jul 12, 2020 · 5 comments
Open

Raise the 127-icons-at-once limit for displaying files #233

c0mmander8 opened this issue Jul 12, 2020 · 5 comments
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements

Comments

@c0mmander8
Copy link
Contributor

c0mmander8 commented Jul 12, 2020

Eliminate, or at least raise, the 127-icons-at-once limit for displaying files, especially if the system has additional memory available.

@c0mmander8 c0mmander8 changed the title Is it possible to eliminate, or at least raise, the 127 icon limit for displaying files, especially if the system has additional memory available? Eliminate, or at least raise, the 127 icon limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icon limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127 icons limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icons limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127 icons-at-once limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@inexorabletash
Copy link
Collaborator

This would require a complete rewrite. Not practical in this project.

@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icons-at-once limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127 icons at once limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icons at once limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127 icons-at-once limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icons-at-once limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127 icons at once limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127 icons at once limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127-icons-at-once limit for displaying files, especially if the system has additional memory available Jul 12, 2020
@c0mmander8
Copy link
Contributor Author

What about doing so within the existing 128K memory footprint?

@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127-icons-at-once limit for displaying files, especially if the system has additional memory available Eliminate, or at least raise, the 127-icons-at-once limit for displaying files within the existing memory footprint Jul 12, 2020
@c0mmander8 c0mmander8 changed the title Eliminate, or at least raise, the 127-icons-at-once limit for displaying files within the existing memory footprint Eliminate, or at least raise, the 127-icons-at-once limit for displaying files within the existing 128K memory footprint Jul 12, 2020
@inexorabletash
Copy link
Collaborator

Many, many parts of the codebase assume at most 127 icons - the guts of the icon painting logic ("IconTK"), the per-window tables listing the icons present, icon id to address mapping, and code throughout that assumes that high bit set = invalid icon. Each icon also requires 25 32 bytes (IconEntry FileRecord) - which admittedly is a little silly as the name is duplicated between those structures. Those two data structures are split across LC 4k banks, which have limited space - the FileRecords consume one entire 4k bank!

I suspect a total rewrite would be easier than retrofitting the existing code. Which is not a bad idea, it's just beyond the scope of this project.

@inexorabletash inexorabletash added the Won't Fix Invalid, no repro, or infeasible label Feb 6, 2021
@c0mmander8
Copy link
Contributor Author

Please reopen this issue. I still think that this issue is an important issue to be implemented because this would greatly increase the usability of Apple II DeskTop.

@inexorabletash inexorabletash added feature request User-facing feature additions/enhancements DeskTop DeskTop bugs or feature requests and removed Won't Fix Invalid, no repro, or infeasible labels May 9, 2023
@inexorabletash inexorabletash added this to the 1.4 milestone May 9, 2023
@inexorabletash inexorabletash changed the title Eliminate, or at least raise, the 127-icons-at-once limit for displaying files within the existing 128K memory footprint Raise the 127-icons-at-once limit for displaying files May 9, 2023
@inexorabletash
Copy link
Collaborator

inexorabletash commented May 9, 2023

Handful of notes about the challenges here to just double the limit to 255 icons, for memory buffers and logic changes:

  • need 2x the room for FileRecord and IconEntry (icon_entries) storage
    • note that name is stored redundantly in each (16 bytes!)
      • Use AuxLC2 $D000 for 256x16 byte names
      • IconEntry needs at least 4 (x/y) 1 (icontype) 2 (flags/window) = 7 bytes
      • FileRecord needs at least 3 (type/aux) 2 (blocks) 4 (date) = 9 bytes
  • need 2x the size for tables:
    • DeskTop's icon_entry_address_table x2
    • IconTK's icon_ptrs x2
      • Dedupe the above two items (e.g. move to LC, accept it'll be exposed)
    • DeskTop's selected_icon_list
    • IconTK's highlight_list
      • Dedupe the above two items (e.g. move to LC, accept it'll be exposed)
    • DeskTop's window_entry_table
    • DeskTop's free_icon_map
      • Compress to a bit map (1/8th the size)
    • DeskTop's cached_window_entry_list
    • IconTK's icon_list
  • Return values from drag/drop (high bit signals window vs. icon)
  • Anything that uses $FF/BMI for failure (vs 0)

@inexorabletash inexorabletash reopened this May 9, 2023
@inexorabletash inexorabletash removed this from the 1.4 milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements
Projects
None yet
Development

No branches or pull requests

2 participants