COMMODORE PLUS/4 WORLD
  Home  Search  Games  Tapes  Covers  Cheats  Maps  Software  New Stuff 
 Hall Of Fame  HVTC  Game Endings  Features  Solutions  Remakes  Publications  Magazines  Effects  Top List 
 Members  Groups  Plus/4 Encyclopedia  Hardware  Tools  Options  Forum 
Login
Back to forumReply To This TopicGo to last reply

Posted By

EVX
on 2017-03-10
17:03:15
 Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Hi there, first off, please excuse any "newb-ness" that you may detect

I am attempting to port some C64 software used on www.commodoreserver.com so I can use my plus/4 on the site. The program (V-1541.prg) is 13 blocks long (1366 lines disassembled).

Page 187 to 194 of the C16_plus4_reference_book.pdf (published by ANCO 1986) shows a 64 to +4 comparison table.

I have identified the lines to be changed, but I am unsure about where to place the code in memory on the Plus/4. As-is, the C64 software lives at C000 to CBEF. There is a version that is at $8000-$8BEF as well.

Neither seem to be appropriate for the Plus/4. Any tips on where to put a program that runs in the background while "Running" programs normally on the machine?

I have made a lot of assumptions so far, so it would be awesome to have some input from the one's who know best!

I'm eager to have a solution to get the Plus/4 online for C=server's file storage and chat capabilities.

-EVX

Posted By

Csabo
on 2017-03-10
17:37:47
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Hi EVX, welcome to the forums

Well, the memory map for the Plus/4 is real simple: from $1000-$FD00 it's all free to be used. The usual way of doing resident stuff is putting it to "as high as possible", and then adjusting the BASIC vectors to exclude that memory area. In your case, you could probably put it to $F000 and up, which would leave $1000-$F000 still free. This means most BASIC programs could still run. (One working example would be Plus4 Support System, or you can look around in the Software/Utility/Programming section.)

The details will depend on what you're doing exactly.

Posted By

Mad
on 2017-03-10
19:49:00
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

I am not really sure, what to answer. The thing is, everything above $8000 (as far as I know) will lie under the rom. You can enable ram by sta $ff3f and enable rom by sta $ff3e (you can write any value there, to get it function). If ram is enabled you can not use the rom functions, as I know so far. Normally I would put any resident programm directly below $fd00, which is the highest memory without getting in trouble with the io area. However, if you place your programm there you have to enable ram to call any function of it. If your programm runs in an interrupt that should be an easy task. You can put the sta $ff3f and later sta $ff3e into the irq handler before calling your programm.

The ram/rom thingy is my assumption of what get wrong with your program [$c000 on C64 is ram]. If it's some other stuff, please write what is going wrong with the program. If you just want to test if it's working perhaps you could try to place it somehow below $8000 so there is no ram/rom problem. Just for testing.

So what exact is the problem? If it's just the memory area, then I would suggest taking an area directly below $fd00. But perhaps there are already some rules about this and other people do know some more..

btw: you could check the Ultimate Map for any plus/4 related details



Posted By

EVX
on 2017-03-10
18:41:03
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Ah! Thanks for the input, it sounds like the program written at $8000-$8BEF will work fine if I prepend the file with the "STA $FF3F" method. My hopes were to make this as easy as possible to port by just changing addresses directed at the zero page. Given that this program has no sound/graphics/sprites, I am hopeful that this task is just that "simple".

I wasn't aware of being able to use the ROM area, so thanks for that tip!

If I do add some code before the original file, say starting at $7FF8 for example, I should be able to run it with the corresponding SYS command (SYS32760) eh?

Posted By

EVX
on 2017-03-10
18:44:15
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

My bad, disregard the "zero page" comment and realize that I am converting addresses from the comparison table between machines. There are quite a few more than just $00FF of them !

Posted By

Mad
on 2017-03-11
06:31:49
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Yes, i think that should work with the sta $ff3f before. However many of the zeropage registers are just required by the rom routines. I am a little curious if it'll work without rom!

If you enable the ram, you must have a propper irq vector in (now ram ) $fffe/$ffff. Or disable interrupts via SEI before. I think it would be good to put there some interruptvector pointing to a routine which enables rom. Perhaps it's a good idea to look at the code pointed to by the rom address $fffe/$ffff.

If you need interrupts and thus can't do a complete SEI, i will try to help.

Posted By

MMS
on 2017-03-10
20:10:24
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

After the PRG will be ready we can test if the Commodore Modems are REALLY 100% compatible with the Plus/4 User Port or not

Posted By

JamesC
on 2017-03-10
20:35:34
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

@MMS - is there a question about Commodore modem compatibility? I was using the 1660 and 1670 with my Plus/4 30 years ago. But my modems were intended for US telephone standards; they might not be compatible with European telephone standards.

Posted By

EVX
on 2017-03-10
22:59:30
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Be advised, one needs a modern modem to use Commodore Server. I use the WiModem, awaiting the new version of the Comet64. You need the buffer they provide to upload and download correctly.

Posted By

MMS
on 2017-03-11
02:52:09
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Thx for the hints! Few things came into my mind.

1) Yeah if you check the official pin layout of the c64 and Plus/4 user port layout, you can see difference, especially as Plus/4 seems named after the rs232 equivalents, while c64 uses an other logic. So the Ultimate Map may needs an update.

2) I checked few circuit diagrams, and I was rather positive, that tha VICMODEM 1600 is compatible, but was unsure anbout 1660,that used the computer sound chip for tone dial.

3) In US (maybe because of the cheper service) the modem is much more wide-spread. Since months I tyr to find a modem, but possible only from US, and they do not ship to Europe, or pretty expensive. One I found a commodore modem 1670 in eBay Italy for 100 bucks! That's insane.

Posted By

SVS
on 2017-03-11
05:56:26
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

@EWX: Look in the Ultimate Map for background green colored cells in the RAM map. They indicate the free for use addresses. There are some in zero page, and more in forwarding (page 1, page 2, etc.). The dark green indicates that the locations are affected by a possible reset, light green does not.

@MMS: pls. specify me what I should update in the RS232 section of UltimateMap, thank you.

Posted By

EVX
on 2017-03-11
13:03:07
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Okay, now I'm seeing some trouble with $8000 and up.

According to http://plus4world.powweb.com/publications/C16_Plus4_Reference_Book - on page 179, $8000 and up is used by the Basic Interpreter.

@SVS: The Ultimate Map makes it seem fairly attractive though...

That's probably not where I want to place the code after all. I need to preserve as much functionality as I can by tucking the RS232 driver somewhere filled with cobwebs. Only 3k bytes, but -- so much for easy-peasy!

@MMS: Commodoreserver.com is a telnet site, so you'll have to find a landline BBS to tinker with the dial up modems... Just get a WiModem and enjoy the new millennium !

Posted By

MMS
on 2017-03-11
17:53:56
 Re: Commodore Server .com -- Porting C64 code to Plus/4 code (V-1541)

Thanks for the infos.

I suppose due to the higher speed/bitrate of the Plus/4 ACIA via User Port, it may catch up with higher bitrate of data without extra puffers (like C128).
But the WiModem will be anyhow necessarry for me too, as I do not have analog telephone line any more, only cable network, wifi and mobile phones. So yeah, I have somewhere a working 56k Modem I used with my PC almost two decades ago, but because of the lack of analog line, I cannot use it any more.
Welcome to the new millenium.



Back to topReply To This Topic


Copyright © Plus/4 World Team, 2001-2017