davervw / ch64edit Goto Github PK
View Code? Open in Web Editor NEWC64 Character Set Editor
Home Page: https://techwithdave.davevw.com/2024/04/edit-vic-20-programmable-characters.html
License: MIT License
C64 Character Set Editor
Home Page: https://techwithdave.davevw.com/2024/04/edit-vic-20-programmable-characters.html
License: MIT License
loading from disk disables interrupts from time to time causing fonts to display wrong in different areas of the screen. Would be best to disable scanline interrupts during this time, and not display character sets to avoid confusion and screen glitches.
The second set should always be copied from $1000-$17ff to $3800-$3fff on program start, regardless of whether already initialized, because user can only load font from command prompt currently.
Between the uppercase/graphics and uppercase/lowercase character sets (512 characters total, 4096 bytes total) there are plenty of duplicates between the sets. And the inverse portions of the sets can be easily computed as well (assuming inverse is wanted, and not further custom characters).
The program "APPLY SET2.PRG" was created to do this from BASIC, but is cumbersome to run (need to move BASIC up to $4000) before loading/running, and use another monitor to save results to disk (not included).
Prefer feature is implemented (with are you sure? prompt)
more colors = more vibrant program, add to theme colors
can always map them all to same color
missing feature, workaround is exit program after initialization, and run again.
LOAD "FONT.BIN",8,1
Create a mini handler at $C000 or such. Or maybe even can be relocated.
color themes change aspects of different parts of the screen.
would like another separate color for charset 1, and another for charset 2
when program exits, memory may be cleared, reused by user for other purposes. Would be bad if IRQ handler, which is useful only for displaying character sets at specific portions of the screen, gets overwritten causing system to crash.
Maybe leverage existing parsing, intercept, and add parsing of address? That way could load charater set at any address.
Recall I was able to do this back in the 80s. I think?
maybe the scanline interrupt is fragile, may have lost an interrupt, not to be seen again, stuck with ROM charset instead of switching between ROM/RAM/RAM which normally displays 3 different sets.
Workaround: cold restart system to reset VIC-II and load program again, load font again
rather than SYS forward, SYS backward. So if NEW, the program is still running. Can always SYS back, or POKE 44,8
That way the editor remains resident until you reset or otherwise take action to reset BASIC page pointer (44)
Reason is to keep character set resident, along with editor while being possible to do other stuff, switch back and forth
start of basic is where fonts are loaded. The initial SYS command is overwritten by ROM font at initial startup. Exiting the program now shows syntax error because the BASIC interpreter is trying to interpret font image data as tokenized BASIC statements.
Very slight risk of having valid instructions there, would have to maliciously load font file with BASIC statements at the beginning of the font. But usually this is just an inconvenience.
Ideal fix would be to move BASIC next token pointer to a place that interprets the end of program (zero bytes) probably by adding $1000 to where a copy of the SYS command has been implemented for restarting the program at the new start of BASIC RAM.
top of BASIC RAM is $9fff
The way the VIC II works, it can access any bank of 16K of RAM in the 64 (one of four). Usually it uses the first 16K with video at $0400 and characters at $1000 which magically maps to ROM $D000. The custom font at $0800 is visible to the VIC, but the second set at $1000 is not visible, so is copied to $3800 to be visible, and the scanline interrupts switch between $D000/$0800/$3800 for showing all three fonts.
But loading fonts also require copying to $3800 to display. And upper/lowercase switch has issues too.
proposed is to move VIC II RAM up to top of BASIC RAM. also need to update lower memory to include pointer to video memory.
video $8c00-$8fff
charset1 $9000-$97ff
charset2 $9800-$9fff
Could also work better with user's own programs using multiple character sets, and upper/lowercase switch (e.g. CBM+SHIFT)
the grid is temporarily filled with the foreground color, then quickly filled with grid colors, causing screen glitch that could be avoided
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.