Commit 9033b1b4 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Updated build structure to use the shared AAsmModule makefile.

  Updated to build using objasm instead of aasm.
  Sources changed to be objasm-compatible.
Admin:
  Requires Library 0.72 or later.
  Requires BuildSys 3.09 or later.
  Requires Env 0.65 or later.

Version 0.13. Tagged as 'Super-0_13'
parent 9dc071a2
hdr/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
c/** gitlab-language=c linguist-language=c linguist-detectable=true
......@@ -19,62 +19,35 @@
# ***********************************
# Date Name Description
# ---- ---- -----------
# 25-May-94 AMcC Created.
# 23-Mar-01 SNB Recreated.
#
#
# Paths
#
EXP_HDR = <export$dir>
#
# Generic options:
#
MKDIR = cdir
AS = aasm
CP = copy
RM = remove
CCFLAGS = -c -depend !Depend -IC:
ASFLAGS = -depend !Depend -Stamp -quit -module -To $@ -From
CPFLAGS = ~cfr~v
#
# Program specific options:
#
COMPONENT = Super
SOURCE = s.Super
TARGET = rm.Super
EXPORTS = ${EXP_HDR}.Super
#
# Generic rules:
#
rom: ${TARGET}
@echo ${COMPONENT}: rom module built
export: ${EXPORTS}
@echo ${COMPONENT}: export complete
COMPONENT = SuperSample
TARGET = Super
HEADER1 = Super
RESOURCES = no
install_rom: ${TARGET}
${CP} ${TARGET} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom module installed
MATRIX1 = Matrix1.s
MATRIX2 = Matrix2.s
clean:
${RM} ${TARGET}
${RM} s.Matrix1
${RM} s.Matrix2
@echo ${COMPONENT}: cleaned
include StdTools
include AAsmModule
${TARGET}: ${SOURCE} s.Matrix2 s.Matrix1
${AS} ${ASFLAGS} ${SOURCE}
clean::
@${RM} ${MATRIX1}
@${RM} ${MATRIX2}
${RM} Matrix1
${RM} Matrix2
@${RM} s.Matrix1
@${RM} s.Matrix2
s.Matrix1: GenMatrix1
GenMatrix1
${ROM_OBJECT} ${SA_OBJECT} ${DBG_OBJECT}: ${MATRIX1} ${MATRIX2}
s.Matrix2: GenMatrix2
GenMatrix2
.SUFFIXES: .c .s
${EXP_HDR}.Super: hdr.Super
${CP} hdr.Super $@ ${CPFLAGS}
.c.s:
${MKDIR} o
${CC} ${STDTOOLOPTIONS} -o $* $<
$* $@
# Dynamic dependencies:
......@@ -14,3 +14,4 @@
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd Makefile
......@@ -9,12 +9,16 @@
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_HelpVersion
Module_MajorVersion SETS "0.12"
Module_Version SETA 12
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.13"
Module_Version SETA 13
Module_MinorVersion SETS ""
Module_Date SETS "28 Sep 2000"
Module_ApplicationDate2 SETS "28-Sep-00"
Module_ApplicationDate4 SETS "28-Sep-2000"
Module_FullVersion SETS "0.12"
Module_HelpVersion SETS "0.12 (28 Sep 2000)"
Module_Date SETS "23 Mar 2001"
Module_ApplicationDate2 SETS "23-Mar-01"
Module_ApplicationDate4 SETS "23-Mar-2001"
Module_ComponentName SETS "Super"
Module_ComponentPath SETS "RiscOS/Sources/Video/Render/Super"
Module_FullVersion SETS "0.13"
Module_HelpVersion SETS "0.13 (23 Mar 2001)"
END
/* (0.12)
/* (0.13)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.12
#define Module_MajorVersion_CMHG 0.13
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Sep 2000
#define Module_Date_CMHG 23 Mar 2001
#define Module_MajorVersion "0.12"
#define Module_Version 12
#define Module_MajorVersion "0.13"
#define Module_Version 13
#define Module_MinorVersion ""
#define Module_Date "28 Sep 2000"
#define Module_Date "23 Mar 2001"
#define Module_ApplicationDate2 "28-Sep-00"
#define Module_ApplicationDate4 "28-Sep-2000"
#define Module_ApplicationDate2 "23-Mar-01"
#define Module_ApplicationDate4 "23-Mar-2001"
#define Module_FullVersion "0.12"
#define Module_HelpVersion "0.12 (28 Sep 2000)"
#define Module_ComponentName "Super"
#define Module_ComponentPath "RiscOS/Sources/Video/Render/Super"
#define Module_FullVersion "0.13"
#define Module_HelpVersion "0.13 (23 Mar 2001)"
/* Copyright 2001 Pace Micro Technology plc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Matrix1
*
* Copyright (C) Pace Micro Technology plc. 2001
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
static void write_file(FILE *f, char *argv[])
{
time_t t;
int x;
time(&t);
fprintf(f, "; > %s\n;\n; Generated by %s at %s;\n", argv[1], argv[0], ctime(&t));
fputs("LookupTable", f);
for (x=0; x<128; ++x) {
int y = 0;
y += ((x >> 0) & 1) * 1;
y += ((x >> 1) & 1) * 2;
y += ((x >> 2) & 1) * 3;
y += ((x >> 3) & 1) * 4;
y += ((x >> 4) & 1) * 3;
y += ((x >> 5) & 1) * 2;
y += ((x >> 6) & 1) * 1;
if (!(x & 15)) fputs("\n DCB ", f); else fputc(',', f);
fprintf(f, "&%02X", y);
}
fputs("\n\n END\n\n", f);
}
int main(int argc, char *argv[])
{
FILE *f;
if (argc != 2) {
fprintf(stderr, "Syntax: %s <output file>\n", argv[0]);
exit(EXIT_FAILURE);
}
f = fopen(argv[1], "w");
if (!f) {
fprintf(stderr, "%s: unable to open %s for output\n", argv[0], argv[1]);
exit(EXIT_FAILURE);
}
write_file(f, argv);
fclose(f);
return EXIT_SUCCESS;
}
/* Copyright 2001 Pace Micro Technology plc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Matrix2
*
* Copyright (C) Pace Micro Technology plc. 2001
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
static const int multiplier_1[] = { 1, 2, 4, 6, 6, 6, 4, 2, 1 };
static const int multiplier_2[] = { 1, 2, 4, 6, 6, 6, 4, 2, 1 };
static const int multiplier_3[] = { 1, 4, 8,12,13,12, 8, 4, 1 };
static int accumulate(const int matrix[], int x)
{
int y, bit;
for (y = bit = 0; bit < 9; ++bit) {
y += ((x >> bit) & 1) * matrix[bit];
}
return y;
}
static void write_file(FILE *f, char *argv[])
{
time_t t;
int x;
time(&t);
fprintf(f, "; > %s\n;\n; Generated by %s at %s;\n", argv[1], argv[0], ctime(&t));
fputs(" [ Module_Version >= 5\n", f);
for (x = 511; x > 0; --x) {
if ((x & 15) == 15) fputs("\n DCB " ,f); else fputc(',', f);
fprintf(f, "&%02X", accumulate(multiplier_1, x));
}
fputs("\n\n |\n\nLookupTable1" ,f);
for (x = 0; x < 512; ++x) {
if (x & 15) fputc(',', f); else fputs("\n DCB ", f);
fprintf(f, "&%02X", accumulate(multiplier_2, x));
}
fputs("\n\n ]\n\nLookupTable2", f);
for (x = 0; x < 512; ++x) {
if (x & 15) fputc(',', f); else fputs("\n DCB ", f);
fprintf(f, "&%02X", accumulate(multiplier_3, x));
}
fputs("\n\n END\n\n", f);
}
int main(int argc, char *argv[])
{
FILE *f;
if (argc != 2) {
fprintf(stderr, "Syntax: %s <output file>\n", argv[0]);
exit(EXIT_FAILURE);
}
f = fopen(argv[1], "w");
if (!f) {
fprintf(stderr, "%s: unable to open %s for output\n", argv[0], argv[1]);
exit(EXIT_FAILURE);
}
write_file(f, argv);
fclose(f);
return EXIT_SUCCESS;
}
......@@ -55,7 +55,7 @@
;-----------------------------------------------------------------------------
LEADR Module_LoadAddr
AREA |SuperSample$$Code|, CODE, READONLY, PIC
Module_BaseAddr
......@@ -365,7 +365,7 @@ sp_localsize # 0
; This table is generated by a BASIC program 'GenMatrix1'
;
GET s.Matrix1
GET Matrix1.s
;-----------------------------------------------------------------------------
......@@ -643,7 +643,7 @@ LookupError
; The new version is accessed via a central point using negative offsets
;
GET s.Matrix2
GET Matrix2.s
[ Module_Version < 5
LookupSwap * LookupTable2 - LookupTable1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment