Cross-platform Apple2/Windows users: Template Creator

28 posts / 0 new
Last post
Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
Cross-platform Apple2/Windows users: Template Creator

Okay.  I apologize for the SPAM--the administrator here can remove this message--but I have a program called Template Creator.  It is a program that creates, handles, organizes and uses templates.  There are versions for DOS, Windows and the C64.  The C128 version currently doesn't work, and I want to port it to the Apple2.  It is located at tmpcreat - Manage Files at SourceForge.net.  I have some templates for it.  It has little for the Apple2 user, but I am accepting donations in the form of Apple2-emulation-related templates, including cc65 code modules.  Instructions are included on the web page.  Try it out!

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
What are your "Templates"

What are your "Templates" used for?  I don't use MS-DOS or Windows.  I have a C64 around here somewhere but it hasn't been plugged in for years.  Any thought of a port for Linux or MacOS?  Those are the two modern platforms I use, mostly Linux except work is on Mac.

 

 

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
Basically, the templates are

Basically, the templates are files of anything from which you want to derive new files.  I currently can't port the program to Linus or MacOS because I don't have those.  :(

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:Basically,
Harry Potter wrote:

Basically, the templates are files of anything from which you want to derive new files.  I currently can't port the program to Linus or MacOS because I don't have those.  :(

 

I don't have Windows, however Linux is a free download, and you can even run it in a VM like VirtualBox.  MacOS of course you need Apple hardware to run legally  (or hacked generic PC hardware or a VM to run illegally).

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I found Linux at Linux ISO

I found Linux at Linux ISO Image Downloads | Linuxlookup but don't know what option to download.  I know almost nothing about Linux.  Is it worth the download?  How do I install Linux on a Windows system?

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I found
Harry Potter wrote:

I found Linux at Linux ISO Image Downloads | Linuxlookup but don't know what option to download.  I know almost nothing about Linux.  Is it worth the download?  How do I install Linux on a Windows system?

I'd recommend going with a recent version of Linux like Ubuntu 22.4.  You can install it in a partition next to your Windows and then dual boot or you can install it into a VM like VirtualBox.

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I downloaded the file.  :)  I

I downloaded the file.  :)  I want an easy way to have both running at the same time.  How do I do that?

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I
Harry Potter wrote:

I downloaded the file.  :)  I want an easy way to have both running at the same time.  How do I do that?

 

VirtualBox is an easy way to do that.  It's a free download as well.

 

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
Thank you.  :)

Thank you.  :)

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I was recently PMed by the

I was recently PMed by the Administrator here and told that I should keep all my SPAM to one thread.  I was told this on another forum as well.  I want to do the right thing, so I'm posting this here.  I have a cc65 library called Fields.  It is a way to allow users to input settings and make choices.  It provides dialog-like support useful for data entry and wherever a user may want to enter data and support for one-level and two-level menu systems.  It also has custom-compilation support to exclude unneeded code.  You can find it at c65 additions - Manage /ui at SourceForge.net.  Try it out!

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
I haven't messed with c65

I haven't messed with c65 much lately, but last time I did, what it really needs to be more universally useful is more standard library compatibility for the Apple II.  Right now it is missing enough stuff that porting a lot of things written on full sized platforms like Linux.  The stuff you are working about for AUX memory support may help.  Fitting a lot of the libraries into a 64k address space is a challenge.

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I thank you for your reply. 

I thank you for your reply.  My AuxMemApple will only be able to put data in the aux RAM, but it will make more memory available in main RAM via my Cubbyhole optimization technique.  Also, my A2SimpleIO and upcoming ProDOSi libraries will help, as they require much less overhead.  A2SimpleIO provides a very efficient and minimal replacement for printf() and puts() and has support for keyboard input and can be found at the link above.  ProDOSi is to be a file I/O API for Apple2 programs that requires much less extra work than the standard file I/O functions, as they access ProDOS functions directly.  However, I am having trouble getting my cc65/Apple2 programs to work; cc65 seems to be adding a useless header that stops the program from working, and I can't disable the header.  :(  When these are available, I want to add some of the memory range between $0800 and $2000 for system programs.  This will require a little extra work, but, with ProDOSi, not much and should be worth it.

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I thank
Harry Potter wrote:

I thank you for your reply.  My AuxMemApple will only be able to put data in the aux RAM, but it will make more memory available in main RAM via my Cubbyhole optimization technique.  Also, my A2SimpleIO and upcoming ProDOSi libraries will help, as they require much less overhead.  A2SimpleIO provides a very efficient and minimal replacement for printf() and puts() and has su

 

I'm assuming you've already read this?

 

https://www.cc65.org/doc/apple2-2.html

 

https://cc65.github.io/doc/apple2.html#ss4.2

 

DOS 3.3 normally has a 4 byte header on binary files which is the default load address and length, as is explained in there.  If something is broken in c65 or that configuration file for ProDOS then it should be possible to hack the code generator part of the compiler or maybe write something like a little Perl script that strips off the header.

 

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I could simply remove the

I could simply remove the header from the .cfg file.  I tried the approach listed in the docs to disable the header.  It didn't work.  :(  I attached the Windows batch file that compiles one of my Apple2 programs.

--------------------

@echo off

::You may need to change the path in the folowing line:cl65 -t apple2enh -C apple2enh-system_aux.cfg -D __EXEHDR__=0 -Ors -o auxtest.system test.c initaux.s readaux.s writeaux.s aux_memcpy.s aux_strlen.s loadaux.c a2simpio.lib

java -jar g:\quick\ac.jar -d testauxdisk.dsk auxtest.system java -jar g:\quick\ac.jar -p testauxdisk.dsk auxtest.system SYS < auxtest.systemjava -jar g:\quick\ac.jar -d testauxdisk.dsk auxro java -jar g:\quick\ac.jar -p testauxdisk.dsk auxro BIN < auxropause 

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I could
Harry Potter wrote:

I could simply remove the header from the .cfg file.  I tried the approach listed in the docs to disable the header.  It didn't work.  :(  I attached the Windows batch file that compiles one of my Apple2 programs.

--------------------

@echo off

::You may need to change the path in the folowing line:cl65 -t apple2enh -C apple2enh-system_aux.cfg -D __EXEH

 

Have you tried editing the apple2enh-system_aux.cfg file?

 

According to this:

 

https://cc65.github.io/doc/apple2enh.html#ss4.2

 

 

It looks like that is set up for DOS 3.3 instead of ProDOS.  You might want to create a new version that merges in the ProDOS options.

 

 

 

 

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I tried to manually disable

I tried to manually disable the header references in the .cfg file and got a missing memory area error.  I attached the .cfg file:

-----------------------

# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)

SYMBOLS {    __EXEHDR__:    type = import;    __FILETYPE__:  type = weak, value = $00FF; # ProDOS file type    __STACKSIZE__: type = weak, value = $0800; # 2k stack    __LCADDR__:    type = weak, value = $D400; # Behind quit code    __LCSIZE__:    type = weak, value = $0C00; # Rest of bank two}MEMORY {    ZP:     file = "", define = yes, start = $0080,         size = $001A;    HEADER: file = %O,               start = $2000 - $003A, size = $003A;    MAIN:   file = %O, define = yes, start = $2000,         size = $BF00 - $2000;    BSS:    file = "",               start = __ONCE_RUN__,  size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;    LC:     file = "", define = yes, start = __LCADDR__,    size = __LCSIZE__;    KEYBUF:                        start = $0200, size = $0100;    AUXMEM: file = "auxro",             define = yes, start = $0800,      size = $B800;}SEGMENTS {    ZEROPAGE: load = ZP,             type = zp;    EXEHDR:   load = HEADER,         type = ro,  optional = yes;    STARTUP:  load = MAIN,           type = ro;    LOWCODE:  load = MAIN,           type = ro,  optional = yes;    CODE:     load = MAIN,           type = ro;    RODATA:   load = MAIN,           type = ro;    DATA:     load = MAIN,           type = rw;    INIT:     load = MAIN,           type = rw;    ONCE:     load = MAIN,           type = ro,  define   = yes;    LC:       load = MAIN, run = LC, type = ro,  optional = yes;    BSS:      load = BSS,            type = bss, define   = yes;    KEYBRO:   load = KEYBUF,          type = ro,  define   = yes, optional = yes;    KEYBRW:   load = KEYBUF,          type = rw,  define   = yes, optional = yes;    KEYBBSS:  load = KEYBUF,          type = bss, define   = yes, optional = yes;    AUXRO:    load = AUXMEM,          type = ro,  define   = yes, optional = yes;    AUXRW:    load = AUXMEM,          type = rw,  define   = yes, optional = yes;    AUXBSS:   load = AUXMEM,          type = bss, define   = yes, optional = yes;}FEATURES {    CONDES: type    = constructor,            label   = __CONSTRUCTOR_TABLE__,            count   = __CONSTRUCTOR_COUNT__,            segment = ONCE;    CONDES: type    = destructor,            label   = __DESTRUCTOR_TABLE__,            count   = __DESTRUCTOR_COUNT__,            segment = RODATA;    CONDES: type    = interruptor,            label   = __INTERRUPTOR_TABLE__,            count   = __INTERRUPTOR_COUNT__,            segment = RODATA,            import  = __CALLIRQ__;} 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I have two uses for Template

I have two uses for Template Creator for Windows and Apple2 emulation: creating new disk images and cc65 code modules.  I sometimes use it to create new CBM disk images and batch files to compile code.

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I got it to work!  :D  I

I got it to work!  :D  I finally read the docs beter and discovered that the default format was an AppleSingle format, and I needed a special option in AppleCommander to get it to work.  I had a recent version of AppleCommander but not Java.  I downloaded new versions of them both, and now my Apple2 programs work!  BTW, printtok.c for the CBM computers should work for the Apple2 as well.  Try it out at c65 additions - Manage /ui at SourceForge.net.  :)

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I tried to
Harry Potter wrote:

I tried to manually disable the header references in the .cfg file and got a missing memory area error.  I attached the .cfg file:

-----------------------

# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)

SYMBOLS {    __EXEHDR__:    type = import;    __FILETYPE__:  type = weak, value = $00FF; # ProDOS file typ

Format is whacked so it is very hard to read.

 

I tried several things to make it readable w/o any luck.

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I'm sorry for the lack-of

I'm sorry for the lack-of-legibility.  :(  It works now.  I thank you for your efforts to help me.  :)

Offline
Last seen: 1 month 2 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
Harry Potter wrote:I'm sorry
Harry Potter wrote:

I'm sorry for the lack-of-legibility.  :(  It works now.  I thank you for your efforts to help me.  :)

Awesome, what was the change that made it work?  Asking so it gets documeted here in case someone else comes along with the same problem...

 

One of the great things about this forum is it seems to come up on google when people are looking for answers to Apple-1, Apple II and Mac questions.

 

 

 

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
All I needed to do was use

All I needed to do was use the -as switch when adding a program to a disk image using AppleCommander.  :)

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
If you're interested, I have

If you're interested, I have a module for  cc65 called printtok.c.  It is a way to print strings with embedded tokens and expand those tokens to full strings.  Unfortunately, it requires manual compression and only helps a little.  I have two versions online: one for CBM and one for the Atari8 series, but the CBM one should work on the Apple2 series.  You can get it at c65 additions - Manage /ui at SourceForge.net.  Try it out!

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I am working on a new version

I am working on a new version of printtok.c with support for a modified version of Infocom's text compression technique and tokenization, but I'm stuck on the input file-parser.  I want the compressor to run on multiple platforms, so, right now, I'm coding using ANSI C.  I am looking for an ANSI C tutorial to refresh my memory.  In the mean time, is there any quick upgrade to printtok.c I can apply now?

Online
Last seen: 1 hour 4 min ago
Joined: Feb 27 2021 - 18:59
Posts: 599
ZSCII

The Infocom text encoding is non-ASCII; I seem to remember they called it ZSCII. The code space was never standardized but it is capable of thousands of different characters.

It's also quite cumbersome for programs written in C because it depends on a corpus of text to mine for "abbreviations".

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I have code from other

I have code from other compression techniques I can use to handle writing bit fields.  I can adapt that and modify my LZ77 code for tokenization.  I can use Assembler but want to do it on more than one platform.  BTW, I want the code to run on bigendian systems as well as on littleendian systems, but the technique is made for little-endian systems.  How do I do the conversion for endianness?  I simply need to swap the bytes.  On the 486+, I have the BSWAP instruction but am looking for something for ANSI C.  What is the most efficient way to do the swap on ANSI C?

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
I'm trying to get the C128

I'm trying to get the C128 version of Template Creator to work.  If I get it to work, should I port t to the Apple 2 or 2GS?  Cc65 can do the Apple2, and I have GSoft BASIC which I can use for the 2GS version.  I need to study the GSoft manual.  Eventually, I want it to support compression.  BASIC's not good at that.  :(  How easy is it to interface assembleer with GSoft BASIC?

Offline
Last seen: 3 months 5 days ago
Joined: Nov 12 2022 - 16:50
Posts: 202
Does anybody here have any

Does anybody here have any Apple2-emulation-related template files to share?  If so, please share it here, and I will post my e-mail address here to receive a copy.

Log in or register to post comments