6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Sep 29, 2024 8:27 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Nov 11, 2019 12:57 am 
Offline

Joined: Mon Nov 11, 2019 12:55 am
Posts: 2
x64
I am a software engineer with a passion for older home computers, and just recently started writing some simple programs in assembly for the C64.
I downloaded VICE and cc65, and compiled the sample programs. Most work well, except for the ones that make use of the TGI driver.

https://github.com/cc65/cc65/blob/maste ... /tgidemo.c

If DYN_DRV is set to 1, the program complains about not being able to load the driver. I suspect that I need to somehow make the driver’s object file available to VICE, but I don’t really understand how.

If I set DYN_DRV to 0, it runs just fine. I assume the driver is being linked into the final executable.

Can you help me figure out how to run TGI with a dynamically linked driver?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 11, 2019 9:08 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10940
Location: England
(I can't help - but welcome!)


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 11, 2019 4:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
The documentation is hard to follow for Dynamic drivers. It does look like you need a TGI driver file to be on your disk drive. That has to be compiled in a previous step but I could not find specific info on how to build that.

From what I can see, its an o65 formatted file with the TGI sources compiled.

There a copy of that file here:
https://sourceforge.net/p/cc65/activity ... 12560e4dd6

Look for the "TGI-preview-0.0.1.zip" file. The o65 file is labeled c64-hi.tgi

My SBC-3 had a custom TGI library but I used it statically. I never tried the dynamic load feature.

Good luck!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 16, 2019 5:15 am 
Offline

Joined: Mon Nov 11, 2019 12:55 am
Posts: 2
Sorry, I missed this!

Thank you for pointing me in the right direction!

I actually did not know about d64 files at all. I was just invoking the emulator as "x64 path/to/prg/file", which seems to implicitly create a d64 file with just that PRG.

Building my own d64 image with both files did the trick. Thanks again!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 16, 2019 5:01 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1738
Location: Sacramento, CA
I'm glad I could help and that you got it working!

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: