]> Shamusworld >> Repos - rmac/blobdiff - direct.c
Force -fa when user passes -p.
[rmac] / direct.c
index a2eef8867618154b181ec48ba513a4afb1c16387..c4395f6a25be142a671189dd7da99b506e4135a7 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -39,15 +39,15 @@ int (*dirtab[])() = {
        d_text,                         // 6 text 
        d_abs,                          // 7 abs 
        d_comm,                         // 8 comm 
-       d_init,                         // 9 init 
+       (void *)d_init,                 // 9 init 
        d_cargs,                        // 10 cargs 
-       d_goto,                         // 11 goto 
-       d_dc,                           // 12 dc 
-       d_ds,                           // 13 ds 
+       (void *)d_goto,                 // 11 goto 
+       (void *)d_dc,                   // 12 dc 
+       (void *)d_ds,                   // 13 ds 
        d_undmac,                       // 14 undefmac 
        d_gpu,                          // 15 .gpu
        d_dsp,                          // 16 .dsp
-       d_dcb,                          // 17 dcb 
+       (void *)d_dcb,                  // 17 dcb 
        d_unimpl,                       // 18* set 
        d_unimpl,                       // 19* reg 
        d_unimpl,                       // 20 dump 
@@ -292,6 +292,7 @@ int d_equrundef(void)
 //
 int d_noclear(void)
 {
+       warn("CLR.L opcode ignored...");
        return 0;
 }
 
@@ -803,9 +804,17 @@ int d_dc(WORD siz)
        if ((scattr & SBSS) != 0)
                return error("illegal initialization of section");
 
+       // Do an auto_even if it's not BYTE sized (hmm, should we be doing this???)
        if ((siz != SIZB) && (sloc & 1))
                auto_even();
 
+       // Check to see if we're trying to set LONGS on a non 32-bit aligned
+       // address in a GPU or DSP section, in their local RAM
+       if ((siz == SIZL) && (orgaddr & 0x03)
+               && ((rgpu && (orgaddr >= 0xF03000) && (orgaddr <= 0xF03FFFF))
+               || (rdsp && (orgaddr >= 0xF1B000) && (orgaddr <= 0xF1CFFFF))))
+               warn("depositing LONGs on a non-long address in local RAM");
+
        for(;; ++tok)
        {
                // dc.b 'string' [,] ...
@@ -856,7 +865,6 @@ int d_dc(WORD siz)
                                if (eval + 0x100 >= 0x200)
                                {
                                        sprintf(buffer, "%s (value = $%X)", range_error, eval);
-//                                     return error(range_error);
                                        return error(buffer);
                                }