Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > coding with C128
2004-11-06 14:44
Stirf
Account closed

Registered: May 2002
Posts: 26
coding with C128

I have a C128 (Not not the desktop version) now and want to use it for coding, preferably using Turbo-Assembler.
How can I use to use the advantages new in Commodore computer?
Are there any specially modded assembler versions for this machine?
2004-11-07 09:55
iopop

Registered: Dec 2001
Posts: 317
Target c128 or c64?

if c64, I know that Lynchbit made some mods on Turbo asm which used the VDC mem on the c128 to temporarily save the source+asm in the VDC when running your code. (Similar to FLT's REU mods of tasm.) However, you need to have 64k VDC installed on your c128, which not all have, so be sure to check that out.

Leech it here: http://rr.c64.org/bin/codeorg2&3.zip
2004-11-07 10:44
Stirf
Account closed

Registered: May 2002
Posts: 26
What is a VDC and how can I obtain one?
2004-11-07 14:23
Steppe

Registered: Jan 2002
Posts: 1510
Every C128 has a VDC, 'tis a video chip for the 80 coloumns mode, you know. :-)
The flat 128 and the plastic case desktop do have 16 KB of VDC mem, the metal cased 128D already has 64 KB of VDC mem. However you can mod the other two 128 revisions to have 64 KB as well. Read here:
http://www.floodgap.com/retrobits/ckb/display.cgi?161
2004-11-08 08:32
Oswald

Registered: Apr 2002
Posts: 5076
I've been coding using this method since '96. Its pretty handy. The VDC assembler, is able to assemble into the 64k vdc chip, after that you have to run a little routine wich swaps the "normal" and the vdc ram. So u can use all 64k for testing code.

the swap routine that comes with it, is quite slow, I've managed to speed it up so it takes about, but rather less than 2 seconds to swap the 2 ram.

Eventhough the VDC has only 2 visible registers mapped in the IO area, you might LOSE source due to buggy code. Buggy code might write random values into the regs so, that you cannot swap back the VDC ram (source) correctly. This happens rarely though.

I keep my swap routine somewhere at $08xx, and I only swap the memory $0900-ffff, so if your code does not overwrite it, you can have the swapper in the memory alway, and switch between "source"-"object" "bank" easily.
2004-11-08 11:08
Krill

Registered: Apr 2002
Posts: 2940
damaging data in the expansion memory also happens using a reu and a reu-based assembler. still it depends on certain ways of implementation, how vulnerable it is to broken code going berserk. f.e. tron/fairlight's reu turbo assembler version is more vulnerable to that than sputnick's virtual assembler, imho because the tron assembler relies on swapping stuff, while sputnick's only copies stuff into the c64's memory, minimizing actual swapping.
2004-11-09 18:58
Stirf
Account closed

Registered: May 2002
Posts: 26
The C128 VDC mod seems do-able for someone like me, mostly because the old ram can be cut away and be discarded.
I will try it, I don't have much to lose because I still have the good old C64.
Thanks people!
2004-11-10 07:14
Graham
Account closed

Registered: Dec 2002
Posts: 990
btw one thing i always wondered: does vdc tasm set a valid vdc screenmode? else the vdc will have problems doing the ram refresh.
2004-11-10 10:44
Oswald

Registered: Apr 2002
Posts: 5076
Graham:

dont think so, the vdc rams works without that, u just have to turn on the machine.

My fastest swap routine turned everything down to minimum (0 rows/0 columns/monochrome/ slowest ram refrsh rate/etc) and it didnt even need to wait for the vdc to signal wether it had finished to read/write a byte. But this is heavily ram type dependent. After succesfully burning the VDC ram, and having it replaced the new rams did not work with the slowest refresh rate, I had to go back and use an older, slower swap routine.
2004-11-10 17:49
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Oswald: i wouldnt trust that. the ram used for the vdc is standard DRAM which absolutely needs a constant refreshing to safely keep its data. to ensure the presence of a useable ram refresh you must set a screenmode and also set a refresh rate which applies to the specs of the drams. this would be 5 refresh cycles per rasterline if you use 15khz horizontal frequency.
2004-11-10 18:39
JackAsser

Registered: Jun 2002
Posts: 2014
Speaking of memory refresh. At work I started to code my own BIOS for our hardware. When I got the memory to work and the setup a gfx mode I drew a stipple pattern into the framebuffer (which resides in the RAM). Then I removed the so-dimm module and waited 30 seconds. Reprogrammed the BIOS so that it doesn't generate a new pattern, but uses what's in memory. When I reinserted the so-dimm module all data was OK, it took about 3 minutes before the data slowly got corrupted.

Quite cool actually. So, what about those old memories in the VDC, how strong are the static charges in those and for how long can it keep it's memory without power?
2004-11-10 18:46
Graham
Account closed

Registered: Dec 2002
Posts: 990
you can test this... disable refresh cycles (best is also to disable rasterline generation, i dont know if the vdc really does 0 refresh cycles per line if its set to 0...) and wait. dont access the vdc ram during that time and make sure also the vdc doesnt do that.
2004-11-11 08:50
Oswald

Registered: Apr 2002
Posts: 5076
Graham: I couldnt find on the net info about the c128's startup, but IIRC it absolutely does not touch the VDC regs before entering 64 mode. The computer starts up with the z80, checks for c= button pressed, and for a cartridge, if cart found it enters 6510 and c64 mode, and the normal 64 kernal startup initalizes the computer which does not set any vdc regs either. (all the z80 code is about 30 lines, its a very-very early startup code, I dont think it touches VDC)

Setting VDC's ram refresh rate to 0 doesnt means you disable it. Thats just the slowest rate of a few selectable time periods.

I *think* VDC resets its inner registers by itself. I had no problems swapping the rams without using vdc tasm, thats also a proof that it works.

Jackasser: my 5 cents to that story, once back in around 93 we were playing on a c64 at one of my friends. We had no cart, so had to turn on/off the machine to reset it, When we wanted to play another game, turning the machine on/off did not help, more and more bugged, but always the prvs game's screen came back after turning the machine back on :D. Finally we waited 1-2 minutes while the machine was off, to get the blue screen.
2004-11-11 08:52
Oswald

Registered: Apr 2002
Posts: 5076
ok I was not precise enough, if c128 has an AR installed, it doesnt run the kernal init ofcourse.
2004-11-11 10:58
Graham
Account closed

Registered: Dec 2002
Posts: 990
maybe the vdc reset init values do some bitmap or character display on a wicked mode. anyway, it's still the best idea to set a valid screenmode and not to rely on someone else doing something that could keep the memory contents intact.
2004-11-23 13:17
Stirf
Account closed

Registered: May 2002
Posts: 26
I have the VDC expansion installed!
I even have the C128 mainboard 100% clean using a special PCB washer, I think I have the most clean C128 mainboard of Holland ;-)
I am now testing the method, and new possibilities.
Anyone still wanting the RAMs that a dealer still has and offered me?
They are HY53C464LS-80 RAMs I can order 4 from a Dutch dealer, which I can sent for 10,- per 2 pieces.
Where is the fast swap routine available, Oswald?
2004-11-23 13:19
Stirf
Account closed

Registered: May 2002
Posts: 26
By the way, Graham, did you know the Tasm that you modded for the Eprom socket of the C128 doesn't work very good on C128 with external drive?
2004-12-17 15:08
Stirf
Account closed

Registered: May 2002
Posts: 26
I found this list on internet, these DRAMs should be compatible for anyone interested...

IC function:
256 kbit (64k?4) DRAM
150 ns(-15), 120 ns(-12), 100 ns(-10), 80 ns(-80)
18-pin DIP

Hitachi HM50464P-15,

Fujitsu MB81464-15,

NEC D41464C-15, D41464C-10

Texas Instruments TMS4464JL-15, TMS4464NL-15, TMS4464-10NL

Sharp LH2464-12,

Oki M41464-12, MN41464A-80

Will a C128 be damaged with no VDCram when shut on?
I wanna try one spare C128 with VDCsockets installed but I have no RAMs yet for that one.
The RAMs are quite hard to get, I heared that old VGAadapters of 80486 PC's have the RAMs we need often.

The VDCasm is quite great, I had troubles with V1.0 (C128 Hanged a lot) but V2.0 doesn't seem to have that problem.
That guy Lynchbit is quite good.
I reckon he could adapt the TurboAssembler for RetroReplay better, last post of that project was in 2002 if I'm correct.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Bieno/Commodore Plus
Laurikka
Mason/Unicess
iAN CooG/HVSC
Dymo/G★P
kbs/Pht/Lxt
Ray Manta/DataDoor
wbochar
MightyAxle
Zirias/Excess
t0m3000/HF^BOOM!^IBX
chesser/Nigaz
Guests online: 111
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Stinsen  (9.6)
4 Mutetus  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.066 sec.