WIP - Yet another Character Set Editor

Basic and Machine Language

Moderator: Moderators

KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

WIP - Yet another Character Set Editor

Post by KingTrode »

This is my 2nd project for the VIC "CharEdit" - Current target VIC 8k+ RAM.

You may wonder why do another one as there have been lots of these down the years. :shock:

Well the reasons are twofold :-

1) Being quite a common utility that we have all used at one time or another, makes it an easier task for me to implement - and therefore further my knowledge of the VIC / 6502

2) If you read the list of planned features below, I'm attempting to implement some features that I have not come across in other editors I have tried - that I would personally find useful, and hopefully you too.

Current Planned Features

All 256 chars available for editing in 2 x 128 banks one keypress to toggle banks (Due to screen space).

Editor Features - Rotate / Invert / Flip / 4 way scroll with wraparound / single row + column scroll / Cut / Copy / Paste / Undo / Pixel Toggle / Hex + Decimal data display.

File I/O Features - Load from 1 to 256 chars to any point in the character set / Save from 1 to 256 chars from any point in the character set with user definable load address / Export from 1 to 256 chars to BASIC (PRG) - Assembler Source (ASM) - Binary (BIN).

Notes
PRG starts off in select mode - use cursor keys to select a character / "B" to toggle bank 1 + 2 (0-127 + 128 - 255) / "E" go to Edit Mode / "S" save / "L" load <--- Note Save/Load quite pointless ATM due to Edit mode not finished.

Edit Mode Keys
R - Rotate
F - Flip
I - Inverse
C - Cut
1 - Scroll Up
2 - Scroll Down
3 - Scroll Left
4 - Scroll Right

All other features are not yet implemented, like pixel toggle / Return to select mode :shock:

Expect much more functional version in the next few days.

Also apologies for any quirky key layouts - Using Vice not a real VIC - so keyboard layout it slightly different.

Always Link to Latest Version
Last edited by KingTrode on Mon May 17, 2010 10:45 am, edited 14 times in total.
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Link on original post updated to latest version - still early stages but some progress made.

Any questions / feedback - please post here.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Post by Vic20-Ian »

Very nice, I like it. Cut might need an undo feature though.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Thanks Ian :D

There is an undo feature yet to be implemented, and the TBH the cut feature as it is - should really be called CLR/CLS I guess :oops:
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Looking very nice, I like the idea to use a non-standard font for the program.

Missing a horizontal flip (<|>) additionally to the vertical flip.

I'm looking forward to see your next versions, keep up the good work!
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Schlowski wrote:Looking very nice, I like the idea to use a non-standard font for the program.

Missing a horizontal flip (<|>) additionally to the vertical flip.

I'm looking forward to see your next versions, keep up the good work!
Thanks for your comments Schlowski :D

The font is one of Jeff's that he made available recently - thanks Jeff :)

Horizonal flip can be achieved - with Flip and Rotate x 2, so I haven't implemented a single keypress version ATM (lazy).

I Should have another version out soon with all the editing features completed, as well as bog standard Load / Save of the whole 256 chars with user entered filename.

This then leaves the advanced Load/Save and Export stuff to do which is a challenge in itself considering my current novice VIC status :roll:

After that some colour injection/cosmetic tweaks to finish off.
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

KingTrode wrote:This then leaves the advanced Load/Save and Export stuff to do [...]
These templates might be of interest to you:

http://www.sleepingelephant.com/ipw-web ... 01&start=5

If you want to save a memory range with another load address than where it's stored, you'll need to use OPEN, CHKOUT, CHROUT, and CLOSE. And this method then only works with disk drives. It is cheaper just to force a load to another address, with the programm that actually uses the charset binary.

And horizontal mirroring should be easy enough with $xx being a free ZP address:

Code: Select all

; ** mirror A
 LDX #8
.loop
 LSR A
 ROL $xx
 DEX
 BNE loop
 LDA $xx
Greetings,

Michael
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Thanks for the Link and Code snippet Mike :D

You have a very valid point that it's just as easy for the users program to force a load to their desired address, so I shall have to reconsider if it's worth the time and effort to implement that feature.
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Link in first post to latest version.

Update:

Full edit cursor movement

"Space" to toggle pixel on/off

"E" to leave edit mode and make permanent any changes made to character.

Load / Save Static filename "CHR.CHAREDIT" - all 256 chars - no error handling ATM

See previous posts for earlier features / keystrokes.



Next update to contain:

"Q" to leave edit mode and cancel and changes made to character.

Copy / Paste / undo in edit mode.

File name input for load/save.
Last edited by KingTrode on Tue May 11, 2010 2:17 pm, edited 5 times in total.
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

"E" to leave edit mode and make permanent any changes made to character.
I've noticed the following issue: as edit mode is left, the "window" for the character select cursor is kept in the state for the edit mode. For this reason, it is now even possible with the select cursor to roam outside the visible screen.

It looks like you constrain the cursor similar to this pseudo-code:

Code: Select all

IF <left> AND X<>0 THEN X=X-1
IF <right> AND X<>7 THEN X=X+1
etc.
This is o.k. as long as the co-ordinates are always inside the window. However, if you place the cursor outside, but don't correct the window you get the described effect.

Greetings,

Michael
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Hi Mike

Thanks for bringing this to my attention. :)

My bad, I uploaded the wrong version :oops:

Correct version uploaded and all links updated.
User avatar
Schlowski
NoMess!
Posts: 892
Joined: Tue Jun 08, 2004 12:20 pm

Post by Schlowski »

Found some time to play around with your editor, works like a charm.

I like your screen layout, very clear and easy for the eyes, not as crowded as my LCE.
But may I request a little feature: As I'm growing older and my memory does not serve me as it did 30 years before I tend to forget which keys/commands are available. A little help screen when pressing F1 for example would be great. You should have enough memory for that, I hadn't when I wrote LCE so I put every info into the main editing screen.

Good work, I'll keep an eye on your progress!
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Schlowski wrote:Found some time to play around with your editor, works like a charm.

I like your screen layout, very clear and easy for the eyes, not as crowded as my LCE.
But may I request a little feature: As I'm growing older and my memory does not serve me as it did 30 years before I tend to forget which keys/commands are available. A little help screen when pressing F1 for example would be great. You should have enough memory for that, I hadn't when I wrote LCE so I put every info into the main editing screen.

Good work, I'll keep an eye on your progress!
Thanks for the feedback Schlowski :D

I will be putting in a Help key feature that shows all keystrokes for both modes, I forget them myself too and I wrote the sucker - Old Age on my part I guess - lol

Should be in there soon, as I have pretty much done with implementing all the features, though the advanced File I/O features are far from finished yet.

Another release is due tonight/tomorrow, the one after that should have a help screen in there as well as a bit of colour here and there.
User avatar
Mike
Herr VC
Posts: 4842
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Schlowski wrote:which keys/commands are available. A little help screen when pressing F1 for example would be great. You should have enough memory for that
A very valid point. And it is not only justified because of Old Age - other programs will use another keyboard command set. Unless you often use a certain program you'll at least confuse keys.

A program can be rendered unusable over the years, if its off-line documentation is lost. There are enough similar programs available on Zimmers, you start them, they present their screen mask, and your next question then is: "What now?"
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

So true Mike, I have had that problem myself with PRG's I have downloaded and then scratched around hoping to find some kind of documentation and drawn a blank.

This can be quite frustrating, and to avoid putting users through the same thing when using my software - I shall always make sure it's in there for them.
Post Reply