Commodore 128 Alive!

Commodore 128 => 128 programmers => Topic started by: airship on October 04, 2007, 08:34 AM

Title: The Perfect C128 Expansion ROM
Post by: airship on October 04, 2007, 08:34 AM
All I want is the perfect expansion ROM for that little socket in my C128. (And yes, I already know about The Servant. That ain't it.)

I want it to provide me with resident system commands that are actually useful. Not fancy, not flashy, no snazzy interfaces, no pretty graphics. Just command-line stuff. Like these from other systems:

PET - BACKUP (but from unit to unit, not drive to drive on those nonexistent dual drives).

DOS - EDIT, ATTRIB, batch files (with all associated commands and functions), ANSI support, system/environment variables beyond TI$ and DS$, pipes & redirection, CHKDSK/SCANDISK, DATE, TIME, DISKCOMP, DOSSHELL (all I really want is command history), ECHO, FC (File Compare), FIND, LABEL, CD/MD/RD/TREE/DELTREE/XCOPY (for 1581 & 64HDD), MOVE, PATH, PRINT, PROMPT, SUBST, SYSINFO, TELNET/FTP/PING (over RS232 or modem), and probably some others I have forgotten about.

LINUX - ALIAS, DIFF, GREP, SETENV, MAN, LS, PWD, WC, SORT, and SPLIT. (Note how I've left out the multitasking commands.)

Maybe add a few more useful extensions, like CONVERT (for PET<>ASC text file conversions), SCREEN (for saving and loading 40/80 column text screens), SPLIT (for creating swappable split text screens), MERGE (for merging BASIC lines from disk, with optional auto line renumbering on the fly), FIND (for searching BASIC program text), DUMP (BASIC variables with references), CASE (switch 40 OR entire 80 column screen between upper/lower or upper/graphic), WORKSPACE (for setting up multiple independent BASIC or M/L program spaces - with zero page support - and swapping to them), MENU (to set up and display or hide a non-scrolling menu bar with various options), POPUP (to create nondestructive popup windows for various purposes), COMPRESS (for ZIP, GZ, ARC, LYNX, and everything else), RAMDOS, VERSION (for computer and peripheral ROM versions), SYSND (for setting various system sounds), ROMRAM (for moving BASIC, KERNAL, or cartridge ROM to RAM, or setting it back to use ROM), CHRSET (for loading a character set from a file, or choosing which RAM or ROM chrset to use), DUMP (display file in Hex), COMPILE (to disk or in memory), ASSEMBLE (likewise, using the BASIC editor - which needs some modificaions, too, while we're at it), MOUSE (to enable/disable a system-level mouse and/or joystick driver with sprite pointer), PAGE (to set options like width and height, screen and character colors, smooth scrolling, VDC double-width characters, display by page, bidirectional scrolling, etc.), BUTTON (to create and destroy fixed, labeled, clickable system butttons), and more. Many, many more.

Everything should take command-line options. For example, MORE should take a filename and unit number.

Then there are the command improvements. LIST needs some formatting options (like no line numbers and prettyprinting indentation). COPY needs added unit to unit support. KEY should let you load and save defined function keys. And other direct mode commands need additional functionality as well. You probably can think of at least a few right now.

These should all work without wiping out a BASIC program in memory, like other direct-mode commands.

While you wouldn't really need a DOS wedge since other commands would do all that, why not have one anyway?

How easy would your life be if your C128 had all that?
Title: The Perfect C128 Expansion ROM
Post by: hydrophilic on October 04, 2007, 02:37 PM
Wow you sure want a lot in that little ROM socket :D

I think it would ALL be possible in a cartridge because you could bank-switch the ROMs.

I lot of those are good ideas but others make me wonder.  Like command line tools and redirection.  Redirection is helpful if a program uses an input stream and produces an output stream, but most Commodore software does not operate that way.  Seems like you need a whole new suite of applications to use the command line tools with.

Command completion / history is a fine tool, but you're not talking about going to a command line system are you?  Oh the horror!

I think simple copy and paste would be super handy.

Multple screens or like you say WORKSPACE would be very useful too.

I don't know how difficult it would be, but what about an emulated 64 mode.  Crazy right?  I was thinking if you could customize the BASIC so it only operated on the 2.0 commands and stored both programs and data in bank 1 starting at $800 and ending at $a000 like the 64.  Of course ML programs would crash if they tried to switch out ROM.  The benefit of course is you could issue GO128 or WORKSPACE in this 'soft 64' mode.
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 04, 2007, 08:25 PM
Quote
I think it would ALL be possible in a cartridge because you could bank-switch the ROMs.


You can bank switch the internal ROM also. There are unused I/O that you can access to switch in extra ROM space.
I have been using an Intel ROM (27011) that gives me 1 meg of ROM to store my favorite programs.

I have Merlin 128, word processer, EPROM burner software, disk copy and file copy routines, disk editor and other utilities.

I'm working on a project to use a 4 meg ROM. Another project is to use FLASH ROM.

Dan...
Title: The Perfect C128 Expansion ROM
Post by: nikoniko on October 04, 2007, 09:53 PM
Dan, since the 128 can only map in 32K of the internal function ROM, how do you select which 32K of the 1MB is being seen?
Title: The Perfect C128 Expansion ROM
Post by: airship on October 05, 2007, 02:39 AM
H, I just did a brain dump, there. I know some of it would be a drastic change, and maybe even impossible.

Knock command-line interfaces all you want, but they are darned handy for lots of things. Face it, the C128 already HAS a command line; you just don't have a prompt. Every direct-mode CBM command proves that. In fact, we have an entire command SCREEN, which is even better!

You could implement redirection easily - CBM's CMD command already does it, after a fashion.

We already do scripts, but we do them with that lame 'print the commands to the screen then POKE the keyboard buffer with a bunch of ' trick. Why not just execute from a file?

Tell me you don't want DIR,9 > POPUP,DW$, Where DIR is a predefined ALIAS for DIRECTORY, and DW$ is a predefined but user-editable environment variable defining the dimensions of a nondestructive bidirectionally-scrolling POPUP Directory Window (ESC to exit). Of course, you could just give an ALIAS to the whole thing, maybe as DIRWIN,9.

Clipboard functions are something I've always wanted but forgot to put on the list. Thanks for mentioning that. A C64 emulator would be cool. I'd love to be able to write and run C64 code without having to switch back and forth. But leave TRAP, AUTO, DELETE, and RENUMBER active for convenience, and allow program editing on the 80-column screen. You could do VIC-20 and PET emulators too, of course. But I think we're drifting off course with all that. Maybe that's a different ROM. Maybe my WORKSPACE command is, too.

But it does remind me that I left out some BASIC programming stuff I'd like to see, like automatic syntax checking on line entry, and the ability to scan an entire program for errors before running it. Editing without visible line numbers would be great, too. Like COMAL.

Let's just admit that Microsoft, Linus, and some of those other guys out there have had SOME good ideas, and let's get them into this machine! And let's automate some of the other stuff it can already do, but which requires PEEKS and POKES or program control to do.

The problem with most utility ROMs is that they've got software in there that's way too powerful, like Dan's list. (Which is why I'm worried about the whole WORKSPACE and emulators thing). Nice to have, sure, but I just want a suite of several dozen short, simple tools with a command-line interface that I can use to get everyday stuff DONE. Wedge 'em into the BASIC interpreter and let's go!

I at least want to at least be able to MORE a sequential file, copy a file from one drive to another, and copy a disk from the command line for goodness' sake!
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 05, 2007, 04:41 AM
Danggit, this BBS needs a Star function, like in Google Reader and GMail so I can "Star" a topic for reference.
Title: The Perfect C128 Expansion ROM
Post by: airship on October 05, 2007, 04:53 AM
What does 'Subscribe to this Topic' do?
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 05, 2007, 05:24 AM
It sends you emails when the topic is updated.
Title: The Perfect C128 Expansion ROM
Post by: Blacklord on October 05, 2007, 05:29 AM
Quote from: plbyrdDanggit, this BBS needs a Star function, like in Google Reader and GMail so I can "Star" a topic for reference.
This can be done (it's an add-on module that lets you tag discussions) - will implement it tonight when I get home from work.

cheers,

Lance
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 05, 2007, 07:37 AM
NICE!
Title: The Perfect C128 Expansion ROM
Post by: Golan Klinger on October 05, 2007, 08:54 AM
That will be handy. I'm forever going back looking for threads/posts that had a particular piece of information I needed to reference.
Title: The Perfect C128 Expansion ROM
Post by: airship on October 05, 2007, 01:37 PM
This will be a great tool to help me remember what I've already ranted about, so I don't repeat myself and/or contradict myself from one rant to another. :P
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 06, 2007, 06:04 PM
Dan, since the 128 can only map in 32K of the internal function ROM, how do you select which 32K of the 1MB is being seen?
Quote
Actually, it's looking at 16K of internal function ROM. The Intel 27011 EPROM has 8 pages of 16K  x 8 ROM. Intel called it a Page-Addressed 1M (8 x 16K x 8) UV Erasable PROM. You are looking at 16K at one time until you flip a page (0-7). And you can select any page you want by bringing the EPROMs page select input low and at the same time have the page you (0-7) want on the data bus.

The page select input is connected to an unused I/O. I use $D700 and the I/O is located at U3 Pin 12 (74LS138). I rigged a 28-pin socket with a wire attached to pin 27 (page select) and other end has a Kwiky-Clip that goes to pin 12 of U3. With the programmed EPROM installed, a simple ML routine can take you to the paged Internal ROM.

   LDA #$06               ;switch to bank 6
   STA $FF00
   LDA #$00               ;select page 0
   STA $D700
   JMP $8000               ;jump to menu

Dan...
Title: The Perfect C128 Expansion ROM
Post by: airship on October 09, 2007, 12:45 AM
Dan, that is SO cool....

It continually amazes me how versatile these old machines are in the hands of a clever hardware and/or software guy.

WOW! If you Google for '27011 eprom', your post is the FOURTH HIT, Dan! :)
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 09, 2007, 08:41 AM
I was doing this in the late 1980's. I programmed a few for friends in the local Commodore Club.
I'm surprised no one else has picked up on this.

I retired about 2 ½ years ago and just recently started playing with my Commodore stash.

Dan...

QuoteWOW! If you Google for '27011 eprom', your post is the FOURTH HIT, Dan!
What does the FOURTH HIT mean?
Title: The Perfect C128 Expansion ROM
Post by: airship on October 09, 2007, 09:30 AM
Google for '27011 EPROM' and your post is the fourth item to be listed. Isn't that cool? :cool:
Title: The Perfect C128 Expansion ROM
Post by: hydrophilic on October 09, 2007, 04:51 PM
Bankable internal ROM is a great idea.  I assumed airship was talking about a simple ROM drop in.  (of course using $D700 for IO is simple too).

If I ever see an 8> prompt on my Commie somebody will get hurt!  I'd use DOS or CP/M if I wanted to see that.  I agree that a simple way to copy disks/files and view text files is very much needed.

The whole write to screen and poke the keyboard buffer routine is very lame, but that doesn't mean we need a command line interface.  The problem is BASIC itself.  Which reminds me, TRAP needs to be fixed to handle disk (or other IO) errors!  This is probably the most common problem (after SYNTAX) to occur but it can't be trapped!  Stupid, stupid, stupid.

Environment variables sounds like a good idea.  I'm thinking they'd be just like BASIC strings, except you can't NEW or CLR them and they can have names longer than two characters.

Listing / editing programs without line numbers and continuous scrolling would be fantastic!  Syntax checking on line entry would cool too.

Off topic, SYNTAX sounds like a theological criticism of goverment activity OR a new way for the church to raise money :)
Title: The Perfect C128 Expansion ROM
Post by: airship on October 10, 2007, 12:10 AM
I DON'T WANT A COMMAND LINE INTERFACE!!!!!! Sheesh! I want the same SCREEN EDITOR we've got now, just with ADDED DOS/UNIX/CP/M-like commands.

Genius is always so misunderstood... :förvånad:
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 10, 2007, 12:53 AM
Also, new BASIC commands for these things make them available from programs, just like JiffyDOS!

BTW, JiffyDOS gives you a lot of command-line like functionality, although I do wish copying files was simpler.  It's a pain to have to /$, then LIST, then CTRL-W, then @X9, then RUN to copy files.
Title: The Perfect C128 Expansion ROM
Post by: Pinacolada on October 11, 2007, 04:31 AM
Quote from: hydrophilicI think simple copy and paste would be super handy.
I have had this idea in the back of my head on the C64 for years: Use the C= key to toggle between highlighting text vs. moving the cursor over when you're editing a BASIC program, then some key combination could paste copies of the text.

ie, the cursor is on line 10, which you want to copy to line 20:

* Hit C= when the cursor is at the first character/token of line 10
* This engages highlight mode, where if you move the cursor to the right, it highlights whatever it passes over until you hit C= again
* Hit Return
* Hit some key (C= P?) to paste in the highlighted text

Yeah, I know you could just type over the line number, changing it to 20, but work with me here :)
Title: The Perfect C128 Expansion ROM
Post by: airship on October 11, 2007, 04:59 AM
I kind of like the idea of using the C= key for highlighting, since the PC standard SHIFT-cursor is out because of shifted cursor-key movement on the C128. (You COULD use the individual cursor keys, of course, except I hate their location on the keyboard.) But what's wrong with CTRL-C and CTRL-X for cut and copy, and CTRL-V to paste? Just to be standardized with - what? - every other PC platform in the world?

You could also use C=C, C=X, and C=V to access a SECOND clipboard. Very handy for: (a) cut one area, (b) cut a second, (c) paste the second where the first was, (d) paste the first where the second was. Or just have a SWAP function where you highlight one, hit your key, then highlight the second and they swap automagically.

You'd need a protected 2K clipboard somewhere in memory. Page 1 comes to mind.
Title: The Perfect C128 Expansion ROM
Post by: Guest on October 11, 2007, 07:42 AM
The lack of clipboard is probably the most important deficiency in programming BASIC directly in a C=, IMHO.
Title: The Perfect C128 Expansion ROM
Post by: swordfish1030 on October 12, 2007, 02:50 PM
so when does this come out in beta? :)
Title: The Perfect C128 Expansion ROM
Post by: airship on October 13, 2007, 12:24 AM
I'm really  more of an idea man. It's up to more knowledgeable and competent guys like Mangelore, Payton, and nikoniko to actually make this stuff. :)
Title: The Perfect C128 Expansion ROM
Post by: Pinacolada on October 17, 2007, 09:21 AM
Quote from: airshipBut what's wrong with CTRL-C and CTRL-X for cut and copy, and CTRL-V to paste? Just to be standardized with - what? - every other PC platform in the world?
Ew, standardization with non-C= computers? :D

Well, my problem with Ctrl-C is it acts like the STOP key. I know you can filter that out on the C64 (read the keyboard matrix instead of peek(198) or summat like that), but I dunno how to do that on the C128.

QuoteYou could also use C=C, C=X, and C=V to access a SECOND clipboard. Very handy for: (a) cut one area, (b) cut a second, (c) paste the second where the first was, (d) paste the first where the second was. Or just have a SWAP function where you highlight one, hit your key, then highlight the second and they swap automagically.
Hmm, interesting idea...
Title: The Perfect C128 Expansion ROM
Post by: airship on October 25, 2007, 07:04 AM
I like the idea of C= /\ and C=\/ (that's up-cursor and down-cursor) for command-line history. Ideally it shouldn't pull up any program lines you've entered - just direct-mode commands that end with [RETURN]. NOT on a command-line but WHEREVER on the screen your cursor happens to be.

Environment variables could work exactly like the KEY command except a value would be assigned to a named variable instead of a function key. Such variables should be persistent - that is, they should be accessible by programs and settable in direct mode but they would NOT be reset by the BASIC line editor or RUN command.

Some environment variables would read their values from BASIC memory - for example, TRMPOS would hold the value in zero page address 11, to indicate the current screen column for TAB and SPC. Each variable of this kind would have the traditional memory address reference name, but could be assigned an ALIAS like this: ALIAS TP=TRMPOS. Any changeable  but system-known value should be associated with a system variable: start of VIC screen memory, color memory address and bank, etc. SETTING one of these variables would CHANGE the associated memory location.

Useful environment CONSTANTS would include addresses in the VIC-II, SID, and MMU chips, as well as common ROM jump table vectors, among others.

This would lead to a big pile of reserved variable names, but it would also make programs more consistent and easier to follow.

And the text-entry line of the screen editor should be expanded to support 3 80-column lines or 6 40-column ones (240 characters). Doesn't BASIC support that many in a crunched program anyway?
Title: The Perfect C128 Expansion ROM
Post by: Pinacolada on October 31, 2007, 07:40 AM
Quote from: airshipI kind of like the idea of using the C= key for highlighting, since the PC standard SHIFT-cursor is out because of shifted cursor-key movement on the C128.
Unless, that is, of course.... *looks thoughtful*

Tapping SHIFT once would toggle between moving the cursor with cursor keys, and selecting text as you go?

Or... why not use the cursor keys on the top row? I suppose their placement is ridiculous for this purpose, though. (Or just in general)
Title: The Perfect C128 Expansion ROM
Post by: airship on October 31, 2007, 11:01 AM
The cursor key placement on the C128 is about as convenient as having them located in the garage.

If I ever win the lottery, I'm going to hire a hardware guy to graft my old IBM Model M keyboard only my C128. Then I'm going to hire a master Japanese calligrapher to paint the CBM graphic characters on the front of the keys. :)
EhPortal 1.34 © 2025, WebDev