second: build updates

This commit is contained in:
Vince Weaver 2023-10-10 01:24:45 -04:00
parent 781bfc50e8
commit d1b1505832
4 changed files with 95 additions and 3 deletions

View File

@ -0,0 +1,24 @@
include ../../../Makefile.inc
DOS33 = ../../../utils/dos33fs-utils/dos33
DOS33_RAW = ../../../utils/dos33fs-utils/dos33_raw
EMPTY_DISK = ../../../empty_disk/empty.dsk
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
LINKER_SCRIPTS = ../../../linker_scripts/
all: TUNNEL
####
TUNNEL: tunnel.o
ld65 -o TUNNEL tunnel.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
tunnel.o: tunnel.s \
../zp.inc ../hardware.inc ../qload.inc
ca65 -o tunnel.o tunnel.s -l tunnel.lst
###
clean:
rm -f *~ *.o *.lst TUNNEL

View File

@ -0,0 +1,42 @@
; Intro
;
; by deater (Vince Weaver) <vince@deater.net>
.include "../zp.inc"
.include "../hardware.inc"
.include "../qload.inc"
hposn_low = $1713 ; 0xC0 bytes (lifetime, used by DrawLargeCharacter)
hposn_high = $1800 ; 0xC0 bytes (lifetime, used by DrawLargeCharacter)
intro_start:
;=====================
; initializations
;=====================
;===================
; Load graphics
;===================
load_loop:
bit SET_GR
bit HIRES
bit FULLGR
bit PAGE1
lda #0
jsr hgr_page1_clearscreen
jsr build_tables
blah:
jmp blah
.align $100
.include "../wait_keypress.s"
.include "../hgr_table.s"
.include "../hgr_clear_screen.s"

View File

@ -7,6 +7,20 @@
/* Output is ca65 6502 assembler for including in project */
/* TOOD:
have a VLIN_ADD like there is for HLIN and BOX
some way of detecting smaller foreground objects and drawing them
separately. Tricky to do
sort PLOT in with HLIN so can use HLIN_ADD but only where appropriate
not sure how much that would save
Optimizations missed compared to by hand
sometimes there are two sets of auto-incremeting HLIN, like on
left and right side of screen. auto can't capture that
action_type can cross color boundaries, can optimize what order
the actions are in to take advantage of this
*/
#include <stdio.h>
#include <stdlib.h>
@ -265,13 +279,17 @@ int find_max_color_extent(int current_color,int *color_minx,int *color_miny,
}
/* The main routine */
int create_using_boxes(void) {
int create_using_boxes(int small_box_threshold) {
int current_primitive=0;
int row,col,box;
int current_color;
int color;
int color_minx,color_maxx,color_miny,color_maxy;
int which_threshold;
//for(which_threshold=0;which_threshold<2;which_threshold++) {
// if (which_threshold==1) small_box_threshold=0;
/* Do one color at a time */
/* The color order is picked in advance */
@ -299,6 +317,12 @@ int create_using_boxes(void) {
int xx,yy,box_found,color_found,color_found2;
// if ((box_sizes[box].x*box_sizes[box].y)
// < small_box_threshold) {
// fprintf(stderr,"Stopping color %d\n",current_color);
// break;
// }
/* check to see if this box size is */
/* the best fit for this color */
for(row=0;row<48-box_sizes[box].y;row++) {
@ -393,6 +417,8 @@ int create_using_boxes(void) {
} // row
} // box
} // current_color
//}
return current_primitive;
}
@ -452,7 +478,7 @@ int generate_frame(int print_results) {
// max_primitive=create_using_hlins();
// max_primitive=create_using_hlins_by_color();
max_primitive=create_using_boxes();
max_primitive=create_using_boxes(0);
/* Optimize boxes to PLOT/VLIN/HLIN */

View File

@ -172,7 +172,7 @@ sector_array:
.byte 0, 0, 0, 0 ; SECOND, MUSIC, ?, ?
length_array:
.byte 16, 32, 84, 48 ; SECOND, MUSIC, ?, ?
.byte 16, 32, 84, 96 ; SECOND, MUSIC, ?, ?
.include "lc_detect.s"
.include "wait.s"