diff --git a/32x50 b/32x50 new file mode 100755 index 0000000..d1d709a Binary files /dev/null and b/32x50 differ diff --git a/32x50_bun.c b/32x50_bun.c new file mode 100644 index 0000000..f5582e0 --- /dev/null +++ b/32x50_bun.c @@ -0,0 +1,63 @@ +/** +* What do we need +* * [ ] screen setup +*/ + +#include + +#include "system/system.h" +#include "system/copper.h" + +#include "screen.h" + +extern struct Custom far custom; + +uint16_t custom_color = (uint16_t)offsetof(Custom, color); +uint16_t custom_sprite = (uint16_t)offsetof(Custom, sprpt); +uint16_t custom_sprite_control = (uint16_t)offsetof(Custom, spr); + +int main(void) { + struct ScreenDefinition screenDefinition; + struct ActiveScreenBufferDetails activeScreenBufferDetails; + uint16_t *copperlist, *currentCopperlist; + void *copperlistBitplanePointers[8][2]; + int i; + + allocateDoubleBufferedScreenMemory( + &screenDefinition, + &activeScreenBufferDetails, + 320, + 256, + 2 + ); + + copperlist = prepareNewCopperlist(300); + + currentCopperlist = addDisplayToCopperlist( + copperlist, + &screenDefinition, + &activeScreenBufferDetails, + &copperlistBitplanePointers + ); + + COPPERLIST_MOVE(currentCopperlist, custom_color, 0x3a6); + COPPERLIST_MOVE(currentCopperlist, custom_color + 2, 0x000); + COPPERLIST_MOVE(currentCopperlist, custom_color + 4, 0xfff); + + endCopperlist(currentCopperlist); + + takeOverSystem(); + + setCopperlist(copperlist); + setUpDisplay((uint32_t)screenDefinition.bitplanes); + + for (i = 0; i < 100000; ++i) { + + } + + giveBackSystem(); + + freeCopperlist(copperlist); + + teardownScreen(&screenDefinition); +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..7245da2 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +## Building + +### Vamos + +You'll want Vamos and SAS/C on Vamos's path: + +``` +ruby ./image_converter.rb && touch images.s && vamos -- smake +``` diff --git a/smakefile b/smakefile index 5f663d9..5a5cf93 100644 --- a/smakefile +++ b/smakefile @@ -1,4 +1,5 @@ MAIN_OBJS = main.o images.o system.lib screen.o bun.o +32_objs = 32x50_bun.o system.lib screen.o all: main @@ -14,6 +15,9 @@ system.lib: system/system.o system/copper.o system/blitter.o system/debug.o main: $(MAIN_OBJS) sc link to main math=standard $(MAIN_OBJS) +32x50: $(32_objs) + sc link to 32x50 $(32_objs) + test: bun_test.o bun.o sc link to bun_test identifierlength=32 math=standard bun_test.o bun.o cutest/CuTest.c