08 April 2023, 07:17 | #1 |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
ushort chip on 1.3 in DICE 3.16 -already answered
OK, I was having an issue, but found the solution...
(After I typed most of this, but before I clicked Submit and found something in an Amiga C book that made me look at the dcc (DICE compiler) doc files closer... ) Spoiler, the solution is: "__chip USHORT" instead of "USHORT chip". ---- The Amiga C Manual (disk 1, example 7) uses this type of data block for their image data: Code:
/* REMEMBER! Image data MUST be put in chip-memory! */ USHORT chip my_image_data[]= /* Image data for a nice four colour face: */ { 0x3E00, /* Bitplane ZERO */ 0x7F00, 0xC980 ... ... I was able to get it to compile and run (on an AmigaForever 2M CHIP A500 config that matches my physical A500), but by doing this: Code:
USHORT my_image_data[]= ------ And as mentioned, the solution was to use the __chip in FRONT of the USHORT instead of just chip after it... I wish I could find my .h file to see what I had used back in the day. Did a different version of DICE change that? Different version of the Amiga C Manual code? Or did I just read the manual better 30+ years ago... (Doubtful, but then again the printed code I found had WAY more commenting that I ever thought I would do... ;-) |
08 April 2023, 11:21 | #2 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,231
|
The original example was never valid C syntax, so I wonder which compiler should have accepted this code snippet.
|
08 April 2023, 19:12 | #3 | ||
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,770
|
Quote:
I just took a look, and it looks like the author was using Lattice C. From the ACM intro chapter: Quote:
|
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DICE documentation | StantheAmigaMan | support.Apps | 24 | 05 April 2023 12:57 |
What is EXTICK? (Edit: Answered) | Starglider 2 | support.Hardware | 0 | 14 September 2018 04:38 |
DICE Disks (adf) | Saghalie | request.Other | 4 | 18 October 2016 21:13 |
Lost in installing dice-3.16 from Aminet! | W4r3DeV1L | support.Apps | 25 | 24 May 2013 20:35 |
Elite 2 very basic question need answered | dword | support.Games | 3 | 19 July 2008 01:41 |
|
|