English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 12 October 2019, 17:54   #41
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 51
Posts: 1,152
Quote:
Originally Posted by deimos View Post
I don't believe you can because the elf format has no concept of chip ram. At the moment I'm just using a CopyToChipMem function that allocates chip memory and copies data over. Not ideal. I think the only way round this would be to rework the link step so that your chip memory data can be done as amiga hunks, possibly from assembler, but I'm not sure it's possible without losing too many of the advantages this environment gives. There's another thread that talks about possible approaches somewhere. I've just decided to not worry about it until I have too much chip memory data to hold two copies of.
You can edit Amiga exe file header and manually change from $00 to $40 bytes(s) for necessary chip hunks. Easy enough, if you know Amiga exe file formats.
Don_Adan is offline  
Old 12 October 2019, 21:52   #42
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 422
Quote:
Originally Posted by Spec-Chum View Post
Awesome work.

Had a quick play and converted my asm takeover code to C and it worked

One snag, however, I couldn't figure out how to put the copperlist array into chip mem? I tried
Code:
__chip
but it didn't work. Using attributes didn't work either as it just says they're disabled.

Any idea how to specify something needs to be in chip mem?


...

you need a compiler/tool-chain which supports different data segments with chip/fast attributes aka Amiga hunk files



With elf you have to use workarounds.
bebbo is offline  
Old 13 October 2019, 11:50   #43
Martin Piper
Registered User

 
Join Date: Oct 2019
Location: Singapore
Posts: 2
Looking at the source for elf2hunk https://github.com/BartmanAbyss/vsco...nk.c#L841-L842

It seems to look at the section for .MEMF_CHIP

So some experimentation there might help?
Martin Piper is offline  
Old 13 October 2019, 12:41   #44
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 267
Quote:
Originally Posted by Martin Piper View Post
Looking at the source for elf2hunk https://github.com/BartmanAbyss/vsco...nk.c#L841-L842

It seems to look at the section for .MEMF_CHIP

So some experimentation there might help?
Well spotted. Googling along those lines got me to this page, http://www.pouet.net/topic.php?which=11781 , at the bottom of which is an example of how to do this.
deimos is online now  
Old 13 October 2019, 21:34   #45
Spec-Chum
Registered User

 
Join Date: Dec 2016
Location: England
Posts: 48
Quote:
Originally Posted by Martin Piper View Post
Looking at the source for elf2hunk https://github.com/BartmanAbyss/vsco...nk.c#L841-L842

It seems to look at the section for .MEMF_CHIP

So some experimentation there might help?
Quote:
Originally Posted by deimos View Post
Well spotted. Googling along those lines got me to this page, http://www.pouet.net/topic.php?which=11781 , at the bottom of which is an example of how to do this.
Cool, worked, thanks for getting to the bottom of that one

Oddly enough, I found that thread on Pouet but didn't read it all after Bartman said he didn't believe it was possible lol
Spec-Chum is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Assembly extension for Visual Studio Code prb28 Coders. Asm / Hardware 119 Today 10:22
Visual Studio Code Blitz Basic extension earok Coders. Blitz Basic 29 16 July 2019 17:59
very basic C/ASM/Visual Studio hand holding Sephnroth Coders. C/C++ 2 08 March 2016 20:15
Profiling WinUAE with Visual Studio 2013 mark_k support.WinUAE 3 14 January 2014 20:26

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07501 seconds with 15 queries