-
Content Count
1,188 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by e5frog
-
Try this then: .moveShipLeft: lisl 3 li 5 ; load A with 5 (minimum x-coordinate) xs S ; exclusive or with scratchpad -> returns zero if equal bz .moveShipEnd ds S br .moveShipEnd .moveShipRight: lisl 3 ; sets ISAR to the x-coordinate register li 50 ; load Ackumulator register with decimal 50 (I'm just guessing the right boundry) xs S ; exclusive or with register that is adressed by ISAR - which is the x-coordinate register ; if they are the same, result will be zero and the zero flag is set bz .moveShipEnd; if they were equal (result zero, skip increasing the x-coordinate) ; and jump past that to the end of the .moveShip-code lr A, S ; load A with contents of register adressed by ISAR (now set to the x-coordinare register) inc ; add 1 to A (A=A+1) lr S, A ; store the increased x-coordinate back into the x-coordinate register br .moveShipEnd ; jump to end of the .moveShip-code - which is not needed, since we're already at the end ; the branch-jump will be exactly 0 ; You can remove that line if you don't want to keep it for "symmetry-reasons" .moveShipEnd: I hope this is clearer, should work fine but you probably need to increse the right boundry to something more than 50. Good luck!
-
What's the problem then? I also wonder about the VESwiki - the whole site seems to be empty. Blackbird (VESwiki owner) uses these subroutines to plot a sprite in our game Pac-man: The sprite.draw routine: ;--------------------------------------------------------------------------- ; Draw Sprite ;--------------------------------------------------------------------------- ; draw a 8x5 sprite from a data pointer ; r1 = color ; r2 = x (to screen) ; r3 = y (to screen) ; r4 = sprite number sprite.draw: ; blit reference: ; r1 = color 1 (off) ; r2 = color 2 (on) ; r3 = x position ; r4 = y position ; r5 = width ; r6 = height ; get the tile address dci sprites ; add the offset lr A, 4 inc ; make sure we hit 0 lr 0, A lis 2 ; two bytes for each sprite sprite.draw.addressLoop: ds 0 bz sprite.draw.addressLoop.end adc br sprite.draw.addressLoop sprite.draw.addressLoop.end: ; load the address for this sprite's number lm lr Qu, A lm lr Ql, A lr DC, Q ; load the sprite size (8x5) lis 8 lr 5, A lis 5 lr 6, A ; load the position lr A, 3 lr 4, A lr A, 2 lr 3, A ; load the colors lr A, 1 lr 2, A li clear lr 1, A ; draw the sprite jmp blit The blit routine: ;---------------; ; Blit Function ; ;---------------; ; this function blits a graphic based on parameters set in r1-r6, ; and the graphic data pointed to by DC0, onto the screen ; ; originally from cart 26, modified and annotated ; uses r1-r9, K, Q ; ; r1 = color 1 (off) ; r2 = color 2 (on) ; r3 = x position ; r4 = y position ; r5 = width ; r6 = height (and vertical counter) ; ; r7 = horizontal counter ; r8 = graphics byte ; r9 = bit counter ; ; DC = pointer to graphics blit: ; adjust the x coordinate lis 4 as 3 lr 3, A ; adjust the y coordinate lis 4 as 4 lr 4, A lis 1 lr 9, A ; load #1 into r9 so it'll be reset when we start lr A, 4 ; load the y offset com ; invert it blit.row: outs 5 ; load accumulator into port 5 (row) ; check vertical counter ds 6 ; decrease r6 (vertical counter) bnc blit.exit ; if it rolls over exit ; load the width into the horizontal counter lr A, 5 lr 7, A lr A, 3 ; load the x position com ; complement it blit.column: outs 4 ; use the accumulator as our initial column ; check to see if this byte is finished ds 9 ; decrease r9 (bit counter) bnz blit.drawBit ; if we aren't done with this byte, branch blit.getByte: ; get the next graphics byte and set related registers lis 8 lr 9, A ; load #8 into r9 (bit counter) lm lr 8, A ; load a graphics byte into r8 blit.drawBit: ; shift graphics byte lr A, 8 ; load r8 (graphics byte) as 8 ; shift left one (with carry) lr 8, A ; save it ; check color to use lr A, 2 ; load color 1 bc blit.savePixel ; if this bit is on, draw the color lr A, 1 ; load color 2 blit.savePixel: inc bc blit.checkColumn ; branch if the color is "clear" outs 1 ; output A in p1 (color) blit.transferData: ; transfer the pixel data lis $6 sl 4 outs 0 lis $c sl 4 outs 0 ; and delay a little bit blit.savePixelDelay: ; ai $60 ; bnz blit.savePixelDelay ; small delay blit.checkColumn: ds 7 ; decrease r7 (horizontal counter) bz blit.checkRow ; if it's 0, branch ins 4 ; get p4 (column) ai $ff ; add 1 (complemented) br blit.column ; branch blit.checkRow: ins 5 ; get p5 (row) ai $ff ; add 1 (complemented) br blit.row ; branch blit.exit: ; return from the subroutine pop Basic plot routine: ;---------------; ; Plot Function ; ;---------------; ; plot out a single point on the screen ; uses three registers as "arguments" ; r1 = color ; r2 = x (to screen) (0-101) ; r3 = y (to screen) (0-57) plot: ; set the color using r1 lr A, 1 outs 1 ; set the column using r2 lis 4 as 2 ; fix the x coordinate com outs 4 ; set the row using r3 lis 4 as 3 ; fix the y coordinate com outs 5 ; transfer data to the screen memory lis $6 sl 4 outs 0 lis $5 sl 4 outs 0 ; delay until it's fully updated ; lis 6 ;plot.delay: ; ai $ff ; bnz plot.delay pop ; return from the subroutine The data is formatted like this, first a list of adresses and then the data itself: ;====================================================================== ==== ; Sprite Data ;=========================================================================== ;--------------------------------------------------------------------------- ; Sprite Array ;--------------------------------------------------------------------------- sprites: .word gfx.clearSprite ; sprite 0 .word gfx.pacman.up.0 ; sprite 1 .word gfx.pacman.up.1 ; sprite 2 .word gfx.pacman.up.2 ; sprite 3 .word gfx.pacman.up.3 ; sprite 4 .word gfx.pacman.down.0 ; sprite 5 .word gfx.pacman.down.1 ; sprite 6 .word gfx.pacman.down.2 ; sprite 7 .word gfx.pacman.down.3 ; sprite 8 ... etc ... and then ;--------------------------------------------------------------------------- ; Clear Sprite ;--------------------------------------------------------------------------- gfx.clearSprite: ; 5x5 block to clear ; a drawn sprite .byte %11111000 .byte %11111000 .byte %11111000 .byte %11111000 .byte %11111000 ;--------------------------------------------------------------------------- ; Pac-Man Sprites ;--------------------------------------------------------------------------- gfx.pacman: ; pacman sprites gfx.pacman.up.0: .byte 000000 .byte %10001000 .byte %11011000 .byte %11111000 .byte %01110000 gfx.pacman.up.1: .byte 000000 .byte %11011000 .byte %11111000 .byte %11111000 .byte %01110000 gfx.pacman.up.2: .byte %01110000 .byte %11111000 .byte %11111000 .byte %11111000 .byte %01110000 gfx.pacman.up.3: .byte 000000 .byte %11011000 .byte %11111000 .byte %11111000 .byte %01110000 gfx.pacman.down.0: .byte %01110000 .byte %11111000 .byte %11011000 .byte %10001000 .byte 000000 gfx.pacman.down.1: .byte %01110000 .byte %11111000 .byte %11111000 .byte %11011000 .byte 000000 gfx.pacman.down.2: .byte %01110000 .byte %11111000 .byte %11111000 .byte %11111000 .byte %01110000 gfx.pacman.down.3: .byte %01110000 .byte %11111000 .byte %11111000 .byte %11011000 .byte 000000 In your program you use these routines and data like this to draw a sprite: ; set color li green ; this is a variable already set to correct hex-value in the ves.h-file lr 1, A ; load x coordinate lis 5 lr 2, A ; load y coordinate lis 10 lr 3, A ; set sprite index ; fourth sprite in data-list above (0,1,2,3,... ) lis 3 lr 4, A ; set bitmask li %11111000 ; plots only 5 bits wide lr 5, A ; draw the sprite pi sprite.draw Outcut from VES.h: ;------------------------ ; Colors ;------------------------ red = $40 blue = $80 green = $00 bkg = $C0 clear = $FF
-
???? Woz said that to bushnell? WTF ::sigh:: Come on guys this is like one of the most famous Atari/Apple stories of all time. Bushnell told Jobs he would offer him $100 per chip saved. Jobs had Woz do the all work with the offer to split it 50/50 and Woz did it with 50 less chips. Jobs then lied to Woz and kept most of the cash for himself. Oh... I never heard it, but I'm mostly snowed into Fairchild... Thanks for the explanaiton.
-
I have no idea what you mean by this post? Or is it just me? An offer of $100 per byte shaved off the current 38 kiloByte of what? This post was about a program for Fairchild Channel F whish uses BIOS calls and therefore only needs 38 bytes of binary code... ... and as "Buyatari" wrote "ODY1" uses no code at all, simply connects circuitry to the code that is already in the machine... I guess you should challenge anyone to make a game on the Channel F smaller than that. BTW, here are binaries of "F8 of Nations" that work in MESS (padded to 2kB), both versions. They also work on a real machine (I've tried it): f8ofNations_b_w.bin f8ofNations_color_score.bin
-
If you read the instructions carefully (perhaps a babelfish-translation from German to English from the instructions on my page http://go.to/channelf, direct link: http://w5.nuinternet.com/s660100106/gallery/txt/saba20.txt ) you'll notice that the game can be set to different levels.... Ofcourse, the computer takes much longer time when increasing the level. If you look at my avatar - that's how a re-built SABA#20 may look.
-
Hello again! Finished Kurt_Woloch's picture, here's a snapshot from MESS: Kurt's mock-up picture: Here's the binary for MESS: picture.bin And finally all the code who made this possible: As you can see I made it easy for me and just plotted the correct spots (columns 121 and 121) to set the palette for each row, this could easily be changed into reading a string of data and have a standard routine for plotting it all. Code game.asm: ; full screen picture demo by e5frog, original picture painted by Kurt_Woloch processor f8 ;=========================================================================== ; VES Header ;=========================================================================== include "ves.h" ;=========================================================================== ; Configuration ;=========================================================================== game_size = 4 ; game size in kilobytes ;=========================================================================== ; Program Entry ;=========================================================================== ;--------------------------------------------------------------------------- ; Cartridge Initalization ;--------------------------------------------------------------------------- org $800 cartridge.init: ; initalize the system CARTRIDGE_START CARTRIDGE_INIT ;--------------------------------------------------------------------------- ; Main Program ;--------------------------------------------------------------------------- main: ; clear to B&W li $21 lr 3, A pi clrscrn ; plot picture blue dci gfx.blue.parameters pi blitGraphic ; plot picture red dci gfx.red.parameters pi blitGraphic ; plot picture green dci gfx.green.parameters pi blitGraphic ; set each palette row ; plot in 121 -> lt.blue, in 122 -> l.gray, both 121 and 122 -> lt.green ;lb clr lr 1, A li 121 ; lt.blue lr 2, A clr lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 1 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 2 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 3 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 4 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 5 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 6 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A lis 7 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A lis 9 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A lis 11 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A lis 13 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A lis 15 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 17 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 19 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 21 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 23 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 25 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 27 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 29 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 31 lr 3, A pi plot ;black ;black ;lb li 121 ; lt.blue lr 2, A li 34 lr 3, A pi plot ;black ;lb li 121 ; lt.blue lr 2, A li 36 lr 3, A pi plot ;lb li 121 ; lt.blue lr 2, A li 37 lr 3, A pi plot ;black ;lg li 121 lr 2, A li 39 lr 3, A pi plot li 122 lr 2, A li 39 lr 3, A pi plot ;black ;40 ;lg li 121 lr 2, A li 41 lr 3, A pi plot li 122 lr 2, A li 41 lr 3, A pi plot ;black ;42 ;lg li 121 lr 2, A li 43 lr 3, A pi plot li 122 lr 2, A li 43 lr 3, A pi plot ;black ;44 ;lg li 121 lr 2, A li 45 lr 3, A pi plot li 122 lr 2, A li 45 lr 3, A pi plot ;black ;46 ;lg li 121 lr 2, A li 47 lr 3, A pi plot li 122 lr 2, A li 47 lr 3, A pi plot ;black ;48 ;lg li 121 lr 2, A li 49 lr 3, A pi plot li 122 lr 2, A li 49 lr 3, A pi plot ;black ;50 ;lg li 121 lr 2, A li 51 lr 3, A pi plot li 122 lr 2, A li 51 lr 3, A pi plot ;black ;52 ;lg li 121 lr 2, A li 53 lr 3, A pi plot li 122 lr 2, A li 53 lr 3, A pi plot ;black ;54 ;lg li 121 lr 2, A li 55 lr 3, A pi plot li 122 lr 2, A li 55 lr 3, A pi plot ;black ;56 ;lg li 121 lr 2, A li 57 lr 3, A pi plot li 122 lr 2, A li 57 lr 3, A pi plot main.end: br main.end ; break!! ;--------------------------------------------------------------------------- include "drawing.inc" ; graphics data include "blue.inc" include "red.inc" include "green.inc" ;=========================================================================== ; Signature ;=========================================================================== ; signature org [$800 + [game_size * $400] -$10] signature: .byte "···Frog·2007····" Code drawing.inc (by Blackbird) ;===================; ; Drawing Functions ; ;===================; ;---------------; ; Plot Function ; ;---------------; ; plot out a single point on the screen ; uses three registers as "arguments" ; r1 = color ; r2 = x (to screen) (0-101) ; r3 = y (to screen) (0-57) plot: ; set the color using r1 lr A, 1 outs 1 ; set the column using r2 lis 4 as 2 ; fix the x coordinate com outs 4 ; set the row using r3 lis 4 as 3 ; fix the y coordinate com outs 5 ; transfer data to the screen memory lis $6 sl 4 outs 0 lis $5 sl 4 outs 0 ; delay until it's fully updated ; lis 6 ;plot.delay: ; ai $ff ; bnz plot.delay pop ; return from the subroutine ; takes graphic parameters from ROM, stores them in r1-r6, ; changes the DC and calls the blit function with the parameters blitGraphic: ; load six bytes from the parameters into r0-r5 lisu 0 lisl 1 blitGraphic.getParams: lm lr I, A ; store byte and decrease ISAR br7 blitGraphic.getParams ; not finished with the registers, loop ; load the graphics address lm lr Qu, A ; into Q lm lr Ql, A lr DC, Q ; load it into the DC ; call the blit function jmp blit ;---------------; ; Blit Function ; ;---------------; ; this function blits a graphic based on parameters set in r1-r6, ; and the graphic data pointed to by DC0, onto the screen ; ; originally from cart 26, modified and annotated ; uses r1-r9, K, Q ; ; r1 = color 1 (off) ; r2 = color 2 (on) ; r3 = x position ; r4 = y position ; r5 = width ; r6 = height (and vertical counter) ; ; r7 = horizontal counter ; r8 = graphics byte ; r9 = bit counter ; ; DC = pointer to graphics blit: ; adjust the x coordinate lis 4 as 3 lr 3, A ; adjust the y coordinate lis 4 as 4 lr 4, A lis 1 lr 9, A ; load #1 into r9 so it'll be reset when we start lr A, 4 ; load the y offset com ; invert it blit.row: outs 5 ; load accumulator into port 5 (row) ; check vertical counter ds 6 ; decrease r6 (vertical counter) bnc blit.exit ; if it rolls over exit ; load the width into the horizontal counter lr A, 5 lr 7, A lr A, 3 ; load the x position com ; complement it blit.column: outs 4 ; use the accumulator as our initial column ; check to see if this byte is finished ds 9 ; decrease r9 (bit counter) bnz blit.drawBit ; if we aren't done with this byte, branch blit.getByte: ; get the next graphics byte and set related registers lis 8 lr 9, A ; load #8 into r9 (bit counter) lm lr 8, A ; load a graphics byte into r8 blit.drawBit: ; shift graphics byte lr A, 8 ; load r8 (graphics byte) as 8 ; shift left one (with carry) lr 8, A ; save it ; check color to use lr A, 2 ; load color 1 bc blit.savePixel ; if this bit is on, draw the color lr A, 1 ; load color 2 blit.savePixel: inc bc blit.checkColumn ; branch if the color is "clear" outs 1 ; output A in p1 (color) blit.transferData: ; transfer the pixel data lis $6 sl 4 outs 0 lis $c sl 4 outs 0 ; and delay a little bit blit.savePixelDelay: ; ai $60 ; bnz blit.savePixelDelay ; small delay blit.checkColumn: ds 7 ; decrease r7 (horizontal counter) bz blit.checkRow ; if it's 0, branch ins 4 ; get p4 (column) ai $ff ; add 1 (complemented) br blit.column ; branch blit.checkRow: ins 5 ; get p5 (row) ai $ff ; add 1 (complemented) br blit.row ; branch blit.exit: ; return from the subroutine pop Bitmaps for blue, green and red dots These were written as as described before, for the blue field all the '.' 'G' and 'R' were replaced by 0 and all B:s were replaced by 1. All whitespace and other extra charaters were removed resulting in a long character string of 1:s and 0:s (mostly zeroes). I had previosly written a small C++ program to format the long string of 0000010010011001000111000 etc into assembler byte-code as can be seen below: .byte 000100, %10011001, etc... Then just add the rest of the data needed for Blackbirds blitGraphics routine, colors, start coordinates, width, height ; blue gfx.blue.parameters: .byte clear ; color 1 .byte blue ; color 2 .byte 0 ; x position .byte 0 ; y position .byte 102 ; width .byte 58 ; height .word gfx.blue.data ; address for the graphics gfx.blue.data: .byte 000001, %01010000, 000100, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, %10000000, 001000, 100100, 000000 .byte 010000, 000101, 000000, 000000, 000000, 000000, 000101 .byte 100000, 000000, 000101, 000010, %10100101, %01000000, 000010 .byte 000001, %01010100, 000000, 000000, 000000, 000000, 000000 .byte 001010, 000001, 100000, 000000, 101000, %10100010, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 100000, 010001, 100000, 001000, 000010, %10100000, 000000 .byte 000000, 000000, 000000, %10100000, 000000, 010001, 100010 .byte 010000, 010000, 000000, 000000, 010000, 000000, 000000 .byte 000000, 000000, 000000, 000001, 000000, 000000, 010000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000010, 000000, 000000, 100101, %01000000, 111100, 000101 .byte %01111111, %11111100, 000000, 000000, 000000, 000000, 000000 .byte 000000, 001000, 000000, %01010000, %11111111, %11111010, %11011111 .byte %11101111, %11111111, %01101101, %11111101, %11110101, %11111110, %10010000 .byte 000100, 000000, 000000, 000000, 010100, %01000000, 000000 .byte 000010, 010000, 000000, 000000, 000000, 010100, 000001 .byte %01000000, %10111111, %11111111, %11111110, %11111111, %11111111, %10111110 .byte %11111111, %10101111, %11111111, 101000, 000000, %01000000, 000001 .byte %11000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 001000, 101000, 000010, %10111100, %11111111 .byte %11111111, %11101111, %11011100, %11111111, %11111111, %11111111, %11111111 .byte %10110000, 000000, 000000, 000001, %11111000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 100010, %10000010, %01010000, 000000, 000000, %10101010 .byte %01011111, %01101001, 100101, %01100101, %11111111, %11000000, 000000 .byte 000000, 010100, %10010101, %01010101, %01010001, %01010000, 000000 .byte 000000, 000000, 000000, 000000, 000101, %01010100, 000010 .byte 101001, %11111111, %11111111, %11101111, %11111101, %10111111, %11111101 .byte %11110111, %11111111, %11101100, 000000, 000000, 000000, 000000 .byte %10101000, %10111101, %01010101, %11111000, 000000, 000010, 000000 .byte 000000, 000101, 000000, 100010, %10001000, 001111, %11111111 .byte %11111110, %11111111, %11101010, %10000010, %10111010, %10000000, 000000 .byte 000000, 000000, 000000, 001000, 000000, %10110000, 000000 .byte %10000000, %10010101, %01010100, 010001, 000000, 000010, 000101 .byte %01010100, 000101, 000101, 110111, %11101111, %11101111, %11111111 .byte %11111111, %11111111, %11110000, 101000, 000000, 000000, 000000 .byte 000000, %10000000, 000000, 000000, %01000000, 000010, %10101000 .byte %01001010, 010001, %01010101, 001010, 000000, 000000, %10000100 .byte 101000, %10010101, 000010, %10000000, 100101, %01001011, %01111110 .byte %01000110, %10100000, 000000, 000000, 000000, 001000, 000000 .byte 000000, 000000, 000000, 000001, 000000, 000000, 010011 .byte %10001000, 001000, %01010101, 000010, 000010, %01010000, %10100001 .byte 000100, 000000, 001101, %01010000, 000001, 000100, 000000 .byte 000000, 000000, 000001, 010000, 000000, 000000, 000000 .byte 000000, %10000100, 010101, %01010001, %01101010, 100100, %01010000 .byte 000010, %01001000, %10100000, %01000000, %10100010, %10010010, 100101 .byte 010001, %01111000, 010000, 000000, 000000, 000000, 000000 .byte 001000, 000000, 000000, %01000000, 000000, 000000, %01010100 .byte 100100, %10001000, %10100000, 000000, %10010101, 100101, 000000 .byte 000000, 100001, 000000, %01010001, 100000, %11010000, 000001 .byte 000000, 000000, 001000, 001000, %01000001, 000000, 000000 .byte 000000, 000000, 000000, 000000, 010101, %01000000, 000000 .byte 100000, 001000, 000000, %11000000, 010000, 000000, %10000000 .byte 000000, 000000, %11000000, 000000, 010010, 000000, 100000 .byte %10000001, 000010, 001000, 000000, 000000, %10100100, %10000000 .byte 000000, 000000, 100010, 000000, 000000, 000000, 100010 .byte 101111, 000010, 010100, 000100, 000000, %01010011, %10000000 .byte 000100, 000101, 000000, 100000, %10000000, %10011110, 010000 .byte %10000000, 010000, 010011, 000010, %01100000, %01000000, 000000 .byte 000101, %01010000, 010100, %11000000, %01000001, %01010010, 000000 .byte 000000, 010000, 001011, 000100, 010000, 000000, 000010 .byte 000000, 000000, 010011, 010010, %01100010, %11000010, 000000 .byte 000000, %01000010, 010000, 001000, %10010100, %01000000, 001100 .byte 001000, 101010, %10000000, 100000, %10000000, 010100, 101010 .byte %10100010, 000010, %10010000, 010100, %01010010, 000000, 000000 .byte 000000, 000010, 000000, %10000000, 000010, 000000, 100010 .byte 000010, %10101011, %11000001, 000000, 000000, 000000, 000000 .byte 000011, %01101010, 000000, %01110010, 000000, 000001, 100001 .byte %01001100, %10100000, 000000, 000100, 000000, 000000, 001010 .byte %10010000, 000000, 000000, %01000000, %01000000, %01001000, 001010 .byte %10000000, 000000, 000000, 000000, 000100, %01011010, 000000 .byte 011010, 000000, 000000, 110001, %01000001, 000000, 000000 .byte %10000100, %01000000, %01000000, 000000, %10110100, %01010000, 000000 .byte 000001, 000000, 000000, 010001, 000000, %10000000, 000000 .byte 000010, 100000, 000101, %11110000, 000001, 000010, 100000 .byte 000010, %10000101, %01010000, 000001, 000000, %01000000, 000000 .byte 000000, 001011, %01000000, 000100, %10100010, 000000, 000000 .byte 000000, 001000, 000000, 001001, 000000, 000000, 010101 .byte %01101101, 000000, 000000, 000000, %10000000, 001001, %10010010 .byte %11000100, %10000000, 010000, 000000, %11011000, 000000, 100000 .byte 100101, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000001, 000000, 000000 .byte 000000, 000000, 000000, 000001, %10001100, 111101, 000101 .byte 000010, %10001011, 000000, 000000, 000000, 001000, %10101010 .byte %01000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte %10000000, %01000010, %01010101, 000000, 000100, 000000, 000000 .byte 000000, 000000, %11001011, 010111, %11110000, %10000000, %10111000 .byte 000000, 000000, 010000, 000000, 010000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000100, %10000101 .byte %01000000, 000100, 110000, 000000, 000000, 000000, 000000 .byte 111000, 100100, %10110010, 000000, %01000000, 000000, 000000 .byte 000000, 000000, %10000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000010, %01101100, 000010, %01010000 .byte 000000, 100000, 000000, 000000, 000001, %10010011, %10000000 .byte %11111111, %01010000, 000000, 000000, 100000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 001010, %10100000, 000000, %01001010, 000000, 000000 .byte %01000000, 001000, 000000, 111100, %10100101, %01100101, %01010000 .byte 000000, 010000, 000000, 000001, 100000, 000000, 000000 .byte 000000, 001000, 000000, 000000, 000000, 000000, 111010 .byte 000010, 000000, 000000, %01000100, 000001, 000010, 000000 .byte 000001, %10000000, %01111110, 001000, %11111110, %10100000, 101010 .byte %10101010, %10100000, %10001000, %10000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 100000 ; green gfx.green.parameters: .byte clear ; color 1 .byte green ; color 2 .byte 0 ; x position .byte 0 ; y position .byte 102 ; width .byte 58 ; height .word gfx.green.data ; address for the graphics gfx.green.data: .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000001, %01000100, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 010010, 000000 .byte 000000, 000001, 000000, %11000101, 010000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000001, 000000, 000000 .byte 000000, %10010000, %01001001, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000001, 000000, %10000000, 000000, 010000 .byte 000100, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000100, 000000, 000000, 000001, 000100, %01000100 .byte %10000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000010, 101000, 000000, %10100000 .byte 000000, 000000, 000000, 000000, 000000, 000000, %01000000 .byte 000000, 000000, 000010, 000000, 001000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000001, 000000, %01010000 .byte 000001, 100000, 101001, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000101, 100000, 000000, 100000, 000000, 000001, 000000 .byte 000101, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, %10000000, 000000, 000000, 000000 .byte 000000, 000000, 100010, %10000010, 001000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000001, 000000, 000000, 000000, 000000, 000000, 000010 .byte 000010, %10000000, 100000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 001010, %10001010, %10101010, %10000000, 000000 .byte 000001, 000000, 000000, 000000, 100000, 000001, %01010000 .byte %10000010, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 100100, %10000000, 100000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, %10000000, 000000, %01000000, %10101000, %10101000 .byte 000001, %01010000, %01001010, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000001, 100000, %01000000, 000000, 000000, 010000 .byte 000000, 000000, 000000, 100000, 101010, %10100010, 100000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 100000 .byte 010100, %10000010, %10010010, %10010010, 010000, 000000, 000000 .byte 000001, %01000000, 000000, 001000, %10001001, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, %10010000, %01010011, 010101 .byte 000000, 000000, %10001010, 000000, 000000, 000001, 000100 .byte %01010000, %10000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000100, 001001, 101000, %01001010, %10101000 .byte 010010, 100010, 000010, 100000, 001000, %01000010, %10000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte %10010101, 010100, 010101, 100000, %01000000, 000000, 000000 .byte 000000, 000001, 000000, 100000, 100000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 101010, %01010100, 001010, %01001010 .byte 010000, 000000, 001000, 100000, 000100, %10000000, %10001001 .byte 000000, 001000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000100 .byte 001010, 000000, %01010000, %10100000, 000000, 010000, 000000 .byte 000000, 000010, 000000, 000000, 000001, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, %01100011, %01001010, %11010000 .byte 001000, %11000100, 000000, 101010, %10100100, 000000, 000000 .byte 000000, 000100, 000010, 000000, 000000, 001010, %10001000 .byte %01000100, %01000000, 000000, %01000000, 000000, 000000, 000000 .byte 000100, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000101, 000000, 000000, 000000, 100100, 000000, %10000100 .byte 000000, 000000, %10100000, 000000, 000000, %10000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000001, 000000, 000101 .byte 101010, %10100000, 000001, 000000, %10100000, 000000, %01000000 .byte %01001000, 000100, 100000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 010101, %01000000, 000000, 001010, %10010000 .byte 000000, 000000, 000001, %01000000, 000000, 101010, 000000 .byte %10010000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000101, %01000101, %01010010, %10100000, 000000, 000000 .byte 000000, 101000, 000000, %10000001, 000000, 100000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 010001, 010010, 000000 .byte 010100, %10010101, %01000000, 000000, 000000, 000000, 000000 .byte 100001, 001000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, %10000010, %01001010, %10100100, %10100101, 101010 .byte %10110100, 000000, 000000, 000000, 001001, 001000, 101000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 001010 .byte %10100100, %01000010, 010010, %10010101, 000000, 000100, 000000 .byte 100000, 000000, 000010, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000001, 000100, 110010, %01001010 .byte 010101, 010101, %01010010, 100000, 000000, 000001, 000000 .byte 000000, 100100, %01000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 001010, %10101000, 001010, %10000101, 110001, %01001001 .byte %10101010, %10100010, 000000, 000010, %10000000, 000010, 000100 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, %10000100 .byte 000000, 000010, 100000, %01000000, 000001, %01010101, %01000000 .byte 000000, 000000, 000000, 000000, 000000 ; red gfx.red.parameters: .byte clear ; color 1 .byte red ; color 2 .byte 0 ; x position .byte 0 ; y position .byte 102 ; width .byte 58 ; height .word gfx.red.data ; address for the graphics gfx.red.data: .byte 000000, 000000, 000000, 000000, 000000, 000000, 000010 .byte %11000000, 000000, 000000, 000000, %10010000, %01000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 001101, 000000 .byte 000000, 000000, 111010, 101000, %01000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 010100, 000000, 000000 .byte 000000, %01101110, %10010110, %11000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, %11110000, 000000, 000000, 001111 .byte %11011011, %11101110, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000010, %11000000, 000000, 000000, %11101010, %10011001 .byte %01101100, 000000, 000000, 000000, 000000, 000000, 000000 .byte 001010, 000000, 000000, 000100, %11010111, %11111111, %01000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 100100 .byte 000000, 000000, %11111101, %11011010, %10110111, %11000000, 000000 .byte 000000, 000000, 000000, 001010, 000000, %11010000, 000000 .byte 011010, %01010111, %11010110, %10101111, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 010000, 000000, 001101, %10101010, %11111110 .byte %10111010, %01000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000101, 000000, %01111111, %11111111, %11111111 .byte %11111111, %11111101, %01010101, %01010101, %11110101, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte %01000100, 001011, %11010100, %10101001, %01011010, %11111111, %11110101 .byte %11111101, %01011101, %01011000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 100000, 000100, 000000, %01101111 .byte %11111110, %10111101, %11111111, %11111111, %11011010, %10101010, %10101101 .byte 000100, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000101, %01010000, %01011101, %01000000 .byte 000000, 001010, %11011011, %01011101, %01010111, %10110000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000100 .byte 000000, 000000, 000000, 000110, %10111111, %01010101, %01010010 .byte %10101010, %10101010, %10110000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, %10100000, 000000, 000000, 000000 .byte 000000, 101110, 001010, %11010101, %11010101, %01010101, %01011011 .byte %10010000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 011100 .byte %01001000, %01000101, 000101, 000000, %10001000, 000001, %10100000 .byte 010110, %10110111, %10101010, %11010101, %01010100, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 101000, %11001010 .byte %10011101, %01001010, %01000000, 001010, 000001, %11011010, %10100011 .byte %10101101, 110101, %01000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 001000, 000100, 010100, 010100, 000000 .byte 001001, %01010101, %01010101, %01010111, 100010, %10000000, %01010101 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 001010, %01000000, 001010, %01010000, 100000, %10011011, %11111011 .byte %11011111, 010010, %11010101, 010001, %01000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 010100, 101010, %01010001, 100001 .byte %11100010, %10000001, %11010101, %11010101, %10011011, %01110101, %01010100 .byte %11010000, %11110101, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 001011 .byte %01010101, 101011, 100000, %01011010, 100111, %11100111, 101000 .byte %01111111, %10100100, %01000100, %01101000, 010100, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 001100, %10100001, 000101 .byte %01010101, 011000, 000000, 000000, 000000, 100000, 000000 .byte 000001, %01010001, 000001, %01010010, 111101, %11010101, %01010101 .byte %10110000, 010100, 111110, %10111111, %01111111, %11001000, 000000 .byte 001000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 101010, %10100100, 110011, %10111011, %10011010, %10110000, %01010001 .byte %01010101, 011111, %01011101, %01110001, %11111011, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000010, %10101111, 000000 .byte 010100, 011011, %01001010, %11101010, %01011111, %01111011, %10111110 .byte %10010101, %01010001, %01011000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 101010, %10111011, %01010101, %11110000, 001101 .byte %10111000, %01110011, %11111110, %10110110, %11011111, %11010101, %11101010 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte %11011010, %11111010, %10101010, 000000, 011011, %10111010, %11011111 .byte %11111111, %11010111, %11111001, 010010, %11111100, %01010000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000110, %11100101, %01010101 .byte %10101001, 100000, 001001, %11001111, %10011111, %11111111, %11111111 .byte %01010010, %10110101, %10000010, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000001, %01100001, %10010101, %01001010, %01010000, 000000 .byte 001000, %11110001, %11110000, %11111111, %11010100, 010011, %01010000 .byte 010000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 110101 .byte %01011010, 000101, %01101101, 001000, %10001010, %10101010, 011111 .byte %01001111, %11011111, %11111101, %01110101, %10000001, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000010, %01000000, 001001, %10010100 .byte 000000, 101000, 000101, %01011001, %11110000, %11111110, 000101 .byte %11111111, %11010000, 010000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 100101, %01000000, 000100, %01010010, %10000000, %10100100 .byte %01010000, %01010101, 001111, %11100101, %01110111, %10111101, %11000001 .byte 000000, 000000, 000000, 000000, 000000, 000000, 000000 .byte 000000, 000000, 000000, 000000, 000000, 000000, %01010001 .byte %01010101, %01011101, %01010111, 100001, 101000, 100000, %10101001 .byte %01111110, %01010111, %11111000, %01000000, %01010000 You also need the ves.h: ;==================================================================== ; VES.H ; Fairchild Channel F Header File ; 20041030 ; by Kevin Lipe ;==================================================================== VESH_VERSION = 101 ; THIS IS A PRELIMINARY RELEASE OF *THE* "STANDARD" VES.H ; ; This file defines memory mapping and BIOS calls for the ; Fairchild Channel F, and also standardized Macros. ;==================================================================== ; E Q U A T E S ;==================================================================== ;------------------------ ; BIOS Calls ;------------------------ clrscrn = $00d0 ;uses r31 delay = $008f pushk = $0107 ;used to allow more subroutine stack space popk = $011e drawchar = $0679 ;------------------------ ; Colors ;------------------------ red = $40 blue = $80 green = $00 bkg = $C0 clear = $FF ;------------------------ ; Schach RAM ;------------------------ ram = $2800 ;location of RAM available in Schach cartridge ;=================================================================== ; M A C R O S ;=================================================================== ;------------------------- ; CARTRIDGE_START ; Original Author: Sean Riddle ; Inserts the $55 that signals a valid Channel F cartridge and an ; unused byte, which places the VES at the cartridge entry point, $802. MAC CARTRIDGE_START .byte $55, $00 ; valid cart indicator, unused byte ENDM ;------------------------- ; CARTRIDGE_INIT ; Original Author: Sean Riddle ; Initalizes the hardware and clears the complement flag. MAC CARTRIDGE_INIT ; initalize the hardware lis 0 outs 1 outs 4 outs 5 outs 0 ; clear the complement flag (r32) lisu 4 lisl 0 lr S, A ENDM ;------------------------- ; PROMPTS_NO_T ; Original Author: Sean Riddle ; This code functions the same as the "prompts" section of the BIOS, ; but this code doesn't have a "T?" prompt, so it's useful in games that ; don't have time limits or settings. MAC PROMPTS_NOT prompts SUBROUTINE LR K,P ; PI pushk ; .prompts2: LI $85 ; red 5 (S) LR $0,A ; PI prompt ; LR A,$4 ; CI $08 ; is it button 4, Start? BF $4,.notbut4 ; no, check others .notbut2: PI popk ; yes, return PK ; .notbut4: CI $02 ; is it button 2, Mode? BF $4,.notbut2 ; LI $8e ; red M LR $0,A ; PI prompt ; LISU 3 ; LISL 6 ; LR A,(IS) ; as 4 ;add the mode to the game # LR (IS),A ; BF $0,.prompts2 ; ENDM ;------------------------- ; SETISAR ; Original Author: Blackbird ; Sets the ISAR to a register number, using lisu and lisl MAC SETISAR lisu [[{1}] >> 3] lisl [[{1}] & %111] ENDM
-
Plotting the Channel F defender_tournament... I've had time to transfer a little, had to cut the height down to 58 rows but added two pixels in width because in case I decide to plot one color at the time, width is then 104 which is evenly divided by 8 which easily sets 13 bytes per row and color, no need to break the rows or pad end with zeroes when translating into assembler-code (adding % in front of eight bits and separating them with a comma). I might replace it with two bits each instead and try and find Blackbirds multi-blit routine somewhere to plot all colors of the graphics in one sweep instead. I think background is 00 and the three colors are coded as 01, 10 and 11. I guess that's the most space-effective way to do it without any type of compression, but I don't know if it's the fastest. I'll just search and replace the letters appropriately (looks awful here as rows are divided): .......B.B.B.........B................................R.RR............. ........ ......GRG.RBG...RB..B.. ;lb .............B.........B.B...........................GRRGR.....B.B..B........... G..RRRBRBGGR.RGBGBRBG.. ;lb .B.B.B............B........B.B.B.B.....................R.R.G.................... .B.GRRGRRRBRGBRGRRGRR.. ;lb ........B.B...B.B...B................................GRRRR....G................. GRRRRRRBRRGRRRRRBRRRB.. ;lb ..B.........B.........B.B.B..........................GR.RR......B.B............G RRBRGRBRGBRRGBRGRRBRR.. ;lb .....B.......................B........................R.R......................R BRRGRGRRRRRRRRRRRGRGB.. ;lb .....................................................GR..R........B.........RRRR RGRRRBRRBRBRBRRGRRRRR.. ;lb BBBB.......B.B.BBBBBBBBBBBBB..............R.R........GRR.R.....G.G.......RR.RG.R RBRRRRRGRGRRGRBRBRRRR.. ;lb BBBBBBBBBBBBB.B.BB.BBBBBBBB.BBBBBBBBBBBB.BB.BB.BBBBBBB.BBBBB.B.BBBBBBBB.B..B.... ....B.................. ;black .............B.B...B...................GBG..GB.......R......G.........RR.RR.RBRB GRRRRRRRBRBRRRGRGBRBB.. ;lb BBBBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBB.BBBBB.BBBBBBBBB.B.BBBBBBBBBBBB..B.B....... ....B.............BBB.. ;black ...................R.RG........RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR.R.RGRBRGRGR RBRGRRRRRGRBRB.BBBB.... ;lb
-
Nice article, short and precise, only objection is this sentence: The F8 chip has no support for sprites at all, everything needed to be plot on the screen must be plot directly into the video-RAM, so "multi-colored sprites" is possible (multi-colored moving objects really), but it would ofcourse take a lot more time to plot them. Also, if there's a collision with graphics that was supposed to be in the background, the background that was over-plot:ed has to be re-drawn. Like in Pac-Man we need to redraw the dots everytime a monster passes over I guess you could compare it to a white-board, you only have three pens: red, blue and green, and then the background can be changed on each line, if black background is chosen all the paint on that line turns white. And a spelling mistake there (forgotten word really) "... resolution of 128 x 64 with 102 x 58 pixels " visible, and that's approximately, on most tv:s it's even less, in MESS they have chosen what I would say is the maximum visible resolution. Other than that - great article!
-
Here's the latest build of Pac-Man (at least I think it is) made by me and Blackbird: http://w5.nuinternet.com/s660100106/files/...elf/pac-man.bin If you want appropriate sound, download this edited version of MESS also (edited and re-complied by Sean Riddle): http://w5.nuinternet.com/s660100106/files/...th_debugger.zip This version also reads an external palette-file so you can tune the colors and the debugger (which needs to be turned on in the ini/channelf.ini "debug 1" if you want to be able to use it) I really need feedback and error-reports, so it would be nice if a few of you could try it out. Edit: BTW, I might try and get that nice picture into a program... shouldn't be that hard.
-
Yes, but fully playable and basically working as it is... Everything is there except a few minor details, no speed increase and the ghosts don't slow down in the tunnel (yet). There will be no speed increase, game is running as fast as it can. Everything else is there I think, different Ghost "AI:s" (similar to original), attackwaves with ghosts returning to corners etc etc etc... Unfortunately I came across a few bugs and haven't been able to reproduce or find them. One was "the missing dot" - all dots appear to have been eaten but the game doesn't end, wandering ghost - ghost wanders outside the playfield (probably related to an error in the "AI"). I also noticed the other day that it might be a good idea to only being able to steer with one of the joysticks when you play a 2-player game... Bugs might have appeared when trying to shrink the code, the intro and graphics takes a lot of space, full game fills a 8kB space on the Multi-Cart - biggest Channel F game ever. Sean Riddle made a program called "lights out" - different patterns on a checkered background where you are supposed to get all blanks. I made a RAM-test program that tests the RAM of the Chess-cart used for Multi-cart and a program that plays through all notes with the PlaySong-routine. There's also a homemade program that plots Scramble-looking scrolling mountains. Can't wait for the VESwiki to get up again, I've written Tim and asked about it - the whole site is currently just empty. Seans Channel F page: http://members.cox.net/seanriddle/chanf.html Here is the code of F8 Nations (pretty fun for a little while): ; F8 of Nations ; ; written by nycurt processor f8 ;------------; ; BIOS Calls ; ;------------; prompt = $0099 clrscrn = $00D0 IncP1Score = $02AC ;===================; ; Main Program Code ; ;===================; ;---------------; ; Program Entry ; ;---------------; org $800 LR $5,A ; $55 Needs to be at beginning of cartridge LR $A,A ; Can be anything in this byte. In early versions this was used as code IF 0 If you add the following code to the beginning of the game, the gameplay will be in color and it will keep track of your score (which wraps around when you get to 99). ENDIF IF 0 li $99 LISU 2 ; 02b0 6e LISL 6 ; 02b0 6e lr I,A li $d6 lisu 3 lr S,A lr 3, A pi clrscrn nextround: LISU 2 ; 02b0 6e pi IncP1Score ENDIF nextround: li $45 ; Bit 6 in this byte is used to emit a sound when written to port 5 outs 5 ; Play a sound ; Store $45 in reg0 - $4 specifies blue and $5 the '5' character to the prompt func. This ; register will be decremented 1 to 4 times to select a number from '1' to '4' lr $0,A ; And the byte referenced by the DC with $3 - this gives a number from 1 to 4 for the game lis $3 ; The DC is used in addressing memory. The H register will have been initialized to 0 by the BIOS ; before we are started, so we point the DC at 0. Each successive round will advance the DC by ; one byte. The number that is selected (1-4) is determined by the low-order three bits in the ; byte loaded from the DC. If the user plays for a very long time the DC will increment beyond ; valid memory. lr DC,H nm ; and #$3 with the memory referenced by the DC lr H,DC ; Loop control variable initialized with the # that the user must match ; The value $10 will be shifted right each time through the loop and will match the correct ; input value for the button that corresponds to the number. lr $9,A li $10 loop: sr 1 ds $0 ; Decrement the value that will be sent to prompt (initialized to $45) ds $9 bc loop lr $9,A ; This has the bit corresponding to the correct button the user must press pi prompt ; This displays the number (with '?'), and waits for input and delays briefly ; There is no need to write $0 to port 0 to prepare it for input... the prompt ; subroutine will have done so for us... see instructions at $764 in BIOS ins 0 ; Retrieve console button state com ; Complement it ($1=but1,$2=but2,$4=but3,$8=but4) ni $F ; Clip off the top four bits outs 5 ; Clear the sound register... We know the relevant top two bits of A are clear xs $9 ; XOR with Reg 9 which contains the correct input delayforever: bnz delayforever ; User lost the game. Freeze br nextround ; The user entered the correct response. Torture them some more org $fff ; added only to set a useable rom-size in MESS .byte $ff
-
To set the boundaries you can add a check here: .moveShipLeft: lisl 3 ds S br .moveShipEnd .moveShipRight: lisl 3 lr A, S inc lr S, A br .moveShipEnd .moveShipEnd: Like this: .moveShipLeft: lisl 3 li 5 ; load A with 5 (minimum x-coordinate) xs S ; exclusive or with scratchpad -> returns zero if equal bz .moveShipEnd ds S br .moveShipEnd .moveShipRight: lisl 3 lr A, S inc lr S, A br .moveShipEnd .moveShipEnd: Same procedure with the moveShipRight.
-
I manged to solve your problem. As I have understood it the Ship is only supposed to move left or right? There's a lot of unused code that can be removed. ;-------------------------; ;=========================; ; Channel Invaders ; ; by Matt Alexander ; ; ; ; code based on Pac-Man ; ; source by Blackbird ; ;=========================; ;-------------------------; processor f8 ;=========; ; Equates ; ;=========; ;------------; ; BIOS Calls ; ;------------; clrscrn = $00d0 ; uses r31 delay = $008f pushk = $0107 ; used to allow more subroutine stack space popk = $011e drawchar = $0679 ;-------------------; ; Color Definitions ; ;-------------------; red = $40 blue = $80 green = $00 bkg = $C0 ;-----------------; ; RAM Definitions ; ;-----------------; ram = $2800 ; use Schach RAM to hold pellet info ;--------------------; ; Register Reference ; ;--------------------; ; The registers in the f8 are used as both RAM and registers for ; this game. The reference is as follows: ; ; r0-r31 general-purpose registers ; r33 level number ; r34 (unused) ; r35 pac-man x coordinate ; r36 pac-man y coordinate ; r37 pac-man direction ; r38 animation index ;---------------; ; Object Colors ; ;---------------; SHIP_COLOR = green SCRN_BGCOLOR = bkg SCRN_FGCOLOR = red ;BULLET_COLOR = red SIDEBAR_COLOR = blue ALIEN1_COLOR = green ALIEN2_COLOR = blue ALIEN3_COLOR = red ;------------------; ; Object Variables ; ;------------------; SHIP_START_X = 40 SHIP_START_Y = 40 ;ALIEN1_START_X = 20 ;ALIEN1_START_y = 70 ;===================; ; Main Program Code ; ;===================; ;---------------; ; Program Entry ; ;---------------; org $800 cartridgeStart: .byte $55, $00 ; cartridge header cartridgeEntry: lis 0 ; init the h/w outs 1 outs 4 outs 5 outs 0 lisu 4 ; r32 = complement flag lisl 0 lr S, A li $c6 ; set to three color, grey background lr 3, A ; clear screen to grey pi clrscrn ; ;---------------; ;main ;---------------; mainloop: startLevel: ; draw the map pi drawMap ; the sidebar pi drawSidebar ;pi drawAlien1 ;pi setupAlien setupShip: lisu 4 lisl 3 li SHIP_START_X lr I, A li SHIP_START_Y lr I, A li 000001 lr I, A li 0 lr S, A ;setupAlien1: ;lisu 4 ;lisl 3 ;li ALIEN1_START_X ;lr I, A ;li ALIEN1_START_Y ;lr I, A ;li 000001 ;lr I, A ;li 0 ;lr S, A playLoop: .clearShip: li SCRN_BGCOLOR lr 1, A lisu 4 lisl 3 lr A, S lr 2, A lisl 4 lr A, S lr 3, A lis 0 lr 4, A pi drawSprite ;.clearAlien1: ;li SCRN_BGCOLOR ;lr 1, A ;lisu 4 ;lisl 3 ;lr A, S ;lr 2, A ;lisl 4 ;lr A, S ;lr 3, A ;lis 0 ;lr 4, A ;pi drawSprite .checkController: pi shipControls .checkDirection: ; pi checkIntersection ; ci 1 ; bnz .checkDirectionEnd lisu 4 lisl 5 lr A, S ns 0 bnz .checkDirectionEnd jmp .drawShip .checkDirectionEnd: .updateShipFrame: lisu 4 lisl 6 lr A, S inc ci 4 bnz .updateShipFrameEnd li 0 .updateShipFrameEnd: lr S, A .moveShip lisu 4 lisl 5 lr A, S lr 0, A ni 000010 bnz .moveShipLeft ;right lr A, 0 ni 000001 bnz .moveShipRight ;no movement br .moveShipEnd .moveShipLeft: lisl 3 ds S br .moveShipEnd .moveShipRight: lisl 3 lr A, S inc lr S, A br .moveShipEnd .moveShipEnd: .drawShip: lisl 5 lr A, S .drawShipIsDirectionRight: ci 000001 bnz .drawShipDirectionLeft lis 13 br .drawShipDirectionEnd .drawShipDirectionLeft: lis 9 .drawShipDirectionEnd: lr 4, A lisu 4 lisl 6 lr A, S lr 0, A lr A, 4 .drawShipGetAddress: ds 0 bm .drawShipGetAddressEnd inc br .drawShipGetAddress .drawShipGetAddressEnd: lr 4, A .drawShipSprite li SHIP_COLOR lr 1, A lisu 4 lisl 3 lr A, I lr 2, A lr A, S lr 3, A pi drawSprite ;.checkAlien: ;pi alienCheck ;.alienClearedCheck: ;dci ram ;li 35 ;lr 0, A ;.alienClearedLoop: ;ds 0 ;bm .alienClearedEmpty ;lm ;ci 0 ;bnz .alienClearedEnd ;br .alienClearedLoop ;.alienClearedEnd: .playLoopDelay: lis 10 lr 5, A pi delay jmp playLoop .playLoopEnd: jmp mainloop endGame: li 4 lr 0, A .endGameLoop: li $ff lr 1, A li 250 lr 2, A li 58 lr 3, A .endGameLoops1: li $5f lr 5, A pi delay li $0 lr 1, A li 250 lr 2, A li 58 lr 3, A .endGameLoop2: ds 3 bm .endGameLoop2End pi plot br .endGameLoop2 .endGameLoop2End: li $5f lr 5, A pi delay .endGameLoopCheck: ds 0 bnz .endGameLoop .endGameEnd: jmp mainloop ;------------------ ;Alien routines ;------------------ ;nada ;------------------ ;------------------ ;controls readController: ; see one of the hand controllers is moved clr outs 0 outs 4 ins 4 com ; un-invert port data ni $cf ; mask off twists, since we don't use them bnz .readControllerEnd outs 1 ins 1 com ni $cf lr 0, A .readControllerEnd: pop shipControls: lr K, P pi pushk pi readController ;left lr A, 0 ni 000010 bnz .shipControlsCheckLeft ;right lr A, 0 ni 000001 bnz .shipControlsCheckRight ;no direction clr br .shipControlsCheckEnd .shipControlsCheckLeft: li 000010 br .shipControlsCheckEnd .shipControlsCheckRight: li 000001 .shipControlsCheckEnd: lisu 4 lisl 5 lr S, A ; store direction in O:45 .shipControlsEnd: pi popk pk ;background crap plot: ; set the color using r1 lr A, 1 outs 1 ; set the column using r2 lr A, 2 ai 4 com outs 4 ; set the row using r3 lr A, 3 ai 4 com outs 5 ; transfer data to the screen memory li $60 outs 0 li $50 outs 0 ; delay until it's fully updated lis 6 .plotDelay: ai $ff bnz .plotDelay pop ; return from the subroutine drawTile: ; registers reference: ; r1 = reserved (plot color) ; r2 = reserved (plot x) ; r3 = reserved (plot y) ; r4 = color 1 ; r5 = color 2 ; r6 = x ; r7 = y ; r8 = loop1 (row) ; r9 = loop2 (column) ; r10 = bitmask ; r11 = graphics byte ; save the return address lr K, P pi pushk ; get the tile address dci tiles ; add the offset lr A, 5 inc ; make sure we hit 0 lr 0, A lis 3 ; three bytes for each tile .drawTileAddressLoop: ds 0 bz .drawTileAddressLoopEnd adc br .drawTileAddressLoop .drawTileAddressLoopEnd: ; got the tile data, now get the graphics address lm lr Qu, A lm lr Ql, A lr DC, Q ; rearrange the registers lr A, 4 lr 7, A lr A, 3 lr 6, A lr A, 2 lr 5, A lr A, 1 lr 4, A ; start row loop li 8 lr 8, A .drawTileRow: ; setup the bit mask li %10000000 ; we only want the left-most pixel lr 10, A ; store it in r10 ; and get the graphics byte lm ; load the pixel and increase the DC lr 11, A ; store it in r11 ; start column loop li 8 lr 9, A .drawTileColumn: ; find out the x address lr A, 9 ; load the new offset com ; and subtract it from 8 inc ; via 2's complement ai 8 ; subtract A from 8, ignore carry as 6 ; add the tile's real x offset lr 2, A ; save it for the subroutine call ; and the y address lr A, 8 ; load the new offset com ; and subtract it from 8 inc ; via 2's complement ai 8 ; subtract A from 8, ignore carry as 7 ; add the tile's real y offset lr 3, A ; save it for the subroutine call ; initially load color 2 lr A, 5 lr 1, A ; see if the pixel is on or off lr A, 11 ; load the byte ns 10 ; mask it with the bitmask bnz .drawTilePixel ; if the pixel's off, use color 1 ; conditionally load color 1 lr A, 4 lr 1, A .drawTilePixel: pi plot .drawTileRollBitmask: ; roll the bitmask lr A, 10 sr 1 lr 10, A .drawTileCheckLoops: ; check column loop ds 9 bnz .drawTileColumn ; check row loop ds 8 bnz .drawTileRow pi popk pk ; return from the subroutine drawMap: ; this function uses several reserve registers ; because the functions called need the immediate ones ; r17 (21o) = x counter ; r18 (22o) = y counter ; load the return address into memory lr K, P pi pushk ; load the map address into DC1 dci maze_map xdc ; clear address offset lisu 2 lisl 5 clr lr S, A lisl 1 ; lis 7 ; load r17 with 7 rows of tiles lr S, A ; .drawMapRow: lisl 2 ; lis 10 ; load r18 with 10 tiles per row lr S, A ; .drawMapColumn: ; this is the start of drawing an individual tile ; note of reference to drawTile: ; r1 = color 1 ; r2 = color 2 ; r3 = x (to screen) ; r4 = y (to screen) ; r5 = tile number lisl 2 ; load register r20 lr A, S lr 0, A ; set r0 as our row counter li 0 ; clear A to the first pixel .drawMapGetX: ds 0 bz .drawMapSaveX ai 8 br .drawMapGetX .drawMapSaveX: com ; we want to display the tiles from inc ; top to bottom, so we inverse ai 72 ; both coordinates lr 3, A ; store the x coordinate in r3 lisl 1 ; load register r19 lr A, S lr 0, A ; set r0 as our column counter li 0 ; clear A to zero .drawMapGetY: ds 0 bz .drawMapSaveY ai 8 br .drawMapGetY .drawMapSaveY: com ; we want to display the tiles from inc ; top to bottom, so we inverse ai 48 ; both coordinates lr 4, A ; store the y coordinate in r4 .drawMapSetupRegisters: ; this block of code gets the next tile number ; and increases the data offset ; swap DC0 and DC1 xdc ; get and save the next tile byte lm lr 5, A ; swap back xdc ; set the colors ; color 1 li SCRN_BGCOLOR lr 1, A ; r1 ; color 2 li SCRN_FGCOLOR lr 2, A ; r2 ; finally, call the tile function pi drawTile .drawMapCheckLoops: ; check column loop lisu 2 lisl 2 ds D ; r18 bnz .drawMapColumn ; check row loop ds S ; r17 bnz .drawMapRow .drawMapReturn: ; return to the program flow pi popk pk ; return from the subroutine drawSprite: ; registers reference: ; r1 = reserved (plot color) ; r2 = reserved (plot x) ; r3 = reserved (plot y) ; r4 = color ; r6 = x ; r7 = y ; r8 = loop1 (row) ; r9 = loop2 (column) ; r10 = bitmask ; r11 = graphics byte ; save the return address lr K, P pi pushk ; get the tile address dci sprites ; add the offset lr A, 4 inc ; make sure we hit 0 lr 0, A lis 2 ; two bytes for each sprite .drawSpriteAddressLoop: ds 0 bz .drawSpriteAddressLoopEnd adc br .drawSpriteAddressLoop .drawSpriteAddressLoopEnd: ; got the sprite data, now get the graphics address lm lr Qu, A lm lr Ql, A lr DC, Q ; rearrange the registers lr A, 3 lr 7, A lr A, 2 lr 6, A lr A, 1 lr 4, A ; start row loop li 5 lr 8, A .drawSpriteRow: ; setup the bit mask li %10000000 ; we only want the left-most pixel lr 10, A ; store it in r10 ; and get the graphics byte lm ; load the pixel and increase the DC lr 11, A ; store it in r11 ; start column loop li 5 lr 9, A .drawSpriteColumn: ; find out the x address lr A, 9 ; load the new offset com ; and subtract it from 5 inc ; via 2's complement ai 5 ; subtract A from 5, ignore carry as 6 ; add the tile's real x offset lr 2, A ; save it for the subroutine call ; and the y address lr A, 8 ; load the new offset com ; and subtract it from 5 inc ; via 2's complement ai 5 ; subtract A from 5, ignore carry as 7 ; add the tile's real y offset lr 3, A ; save it for the subroutine call ; see if the pixel is on or off lr A, 11 ; load the byte ns 10 ; mask it with the bitmask bz .drawSpriteRollBitmask ; if the pixel's off, don't draw anything ; conditionally load color 1 lr A, 4 lr 1, A .drawSpritePixel: pi plot .drawSpriteRollBitmask: ; roll the bitmask lr A, 10 sr 1 lr 10, A .drawSpriteCheckLoops: ; check column loop ds 9 bnz .drawSpriteColumn ; check row loop ds 8 bnz .drawSpriteRow .drawSpriteEnd: pi popk pk ; return from the subroutine ;--------------; ; Draw Sidebar ; ;--------------; ; draws the right sidebar rectangle drawSidebar: ; save return address lr K, P ; set sidebar color li SIDEBAR_COLOR lr 1, A ; start row loop li 57 lr 3, A .drawSidebarRow: li 101 lr 2, A .drawSidebarColumn: pi plot .drawSidebarCheck: ds 2 lr A, 2 xi %01010000 bnz .drawSidebarColumn ds 3 bp .drawSidebarRow ;.drawSidebarText: ;dci scoreGraphic.parameters ;pi blitGraphic ;dci highGraphic.parameters ;pi blitGraphic .drawSidebarEnd: pk drawScore: ; save return address lr K, P pi pushk ; load colors li SIDEBAR_COLOR lr 1, A li blue lr 2, A ; load position li 78 lr 10, A lis 6 lr 11, A ; set number counter lis 8 lr 0, A ; and ISAR lisu 7 lisl 4 .drawScoreLoop: ; set DC dci numberGraphics ; load size lis 3 lr 5, A lis 5 lr 6, A ; load position lr A, 10 lr 3, A lr A, 11 lr 4, A ; see if the tile is even or odd lis 1 ns 0 bz .drawScoreShiftByte ; if even, branch ; get lower half-byte lis %1111 ns I ; set ISAR to next byte br .drawScoreDrawDigit .drawScoreShiftByte: ; get upper half-byte lr A, S sr 4 .drawScoreDrawDigit: ; add tile offset sl 1 adc ; and draw the number ;pi blit ; increase x position lis 4 as 10 lr 10, A ; each tile is three pixels + one pixel space ; decrease the counter ds 0 bz .drawScoreEnd ; reached the end, break ; check to see if we're on tile 4 lis 4 xs 0 bnz .drawScoreLoop .drawScoreChangeRow: li 82 lr 10, A lis 12 lr 11, A br .drawScoreLoop .drawScoreEnd: ; return from subroutine pi popk pk ;-----------; ; Tile Data ; ;-----------; ; format: ; two bytes for the address of the tile ; one byte for the boundaries of the tile (00 + up + down + left + right) tiles: ; these are regular tiles ; which can be used in any map ; tile 0 .word tilePic_0 .byte 001111 ; tile 1 .word tilePic_1 .byte 000101 ; tile 2 .word tilePic_2 .byte 000111 ; tile 3 .word tilePic_3 .byte 000011 ; tile 4 .word tilePic_4 .byte 000110 ; tile 5 .word tilePic_5 .byte 001001 ; tile 6 .word tilePic_6 .byte 001110 ; tile 7 .word tilePic_7 .byte 001011 ; tile 8 .word tilePic_8 .byte 001101 ;---------------; ; Tile Graphics ; ;---------------; tilePic_0: .byte 000000 .byte 000000 .byte 000000 .byte 000000 .byte 000000 .byte 000000 .byte 000000 .byte 000000 tilePic_1: .byte 000000 .byte 111111 .byte %01000000 .byte %01001111 .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 tilePic_2: .byte 000000 .byte %11111111 .byte 000000 .byte %11111111 .byte 000000 .byte 000000 .byte 000000 .byte 000000 tilePic_3: .byte 000000 .byte %11111110 .byte 000001 .byte %11111001 .byte 000101 .byte 000101 .byte 000101 .byte 000101 tilePic_4: .byte 000101 .byte 000101 .byte 000101 .byte 000101 .byte 000101 .byte 000101 .byte 000101 .byte 000101 tilePic_5: .byte 000101 .byte 000101 .byte 000101 .byte 000101 .byte %11111001 .byte 000001 .byte %11111110 .byte 000000 tilePic_6: .byte %11111111 .byte %10010011 .byte 111000 .byte %01101100 .byte %11000111 .byte 000000 .byte %11111111 .byte 000000 tilePic_7: .byte %01010001 .byte %01010001 .byte %01010000 .byte %01010000 .byte %01001111 .byte %01000000 .byte 111111 .byte 000000 tilePic_8: .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 .byte %01010000 ;------------; ; Level Data ; ;------------; maze_map: ; level map .byte 1, 2, 2, 2, 2, 2, 2, 2, 2, 3 .byte 8, 0, 0, 0, 0, 0, 0, 0, 0, 4 .byte 8, 0, 0, 0, 0, 0, 0, 0, 0, 4 .byte 8, 0, 0, 0, 0, 0, 0, 0, 0, 4 .byte 8, 0, 0, 0, 0, 0, 0, 0, 0, 4 .byte 8, 0, 0, 0, 0, 0, 0, 0, 0, 4 .byte 7, 6, 6, 6, 6, 6, 6, 6, 6, 5 ;----------------; ; Ship Sprites ; ;----------------; sprites: .word clearSprite ; sprite 0 .word .shipSpritesLeft ; sprite 1 .word .shipSpritesLeft+5 ; sprite 2 .word .shipSpritesLeft+10 ; sprite 3 .word .shipSpritesLeft+15 ; sprite 4 .word .shipSpritesRight ; sprite 5 .word .shipSpritesRight+5 ; sprite 6 .word .shipSpritesRight+10 ; sprite 7 .word .shipSpritesRight+15 ; sprite 8 .word .shipSpritesUp .word .shipSpritesUp+5 .word .shipSpritesUp+10 .word .shipSpritesUp+15 .word .shipSpritesDown .word .shipSpritesDown+5 .word .shipSpritesDown+10 .word .shipSpritesDown+15 .word .alien1SpritesUp .word .alien1SpritesUp+5 .word .alien1SpritesUp+10 .word .alien1SpritesUp+15 .word .alien1SpritesDown .word .alien1SpritesDown+5 .word .alien1SpritesDown+10 .word .alien1SpritesDown+15 .word .alien1SpritesLeft .word .alien1SpritesLeft+5 .word .alien1SpritesLeft+10 .word .alien1SpritesLeft+15 .word .alien1SpritesRight .word .alien1SpritesRight+5 .word .alien1SpritesRight+10 .word .alien1SpritesRight+15 clearSprite: ; 5x5 block to clear ; a drawn sprite .byte %11111100 .byte %11111100 .byte %11111100 .byte %11111100 .byte %11111100 shipSprites: .shipSpritesLeft: ; sprite 0 .byte 100000 .byte 100000 .byte %01010000 .byte %11111000 .byte %10101000 ; sprite 1 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 ; sprite 2 .byte 100000 .byte 100000 .byte %01110000 .byte %11011000 .byte %10101000 ; sprite 3 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 .shipSpritesRight: .byte 100000 .byte 100000 .byte %01010000 .byte %11111000 .byte %10101000 ; sprite 1 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 ; sprite 2 .byte 100000 .byte 100000 .byte %01110000 .byte %11011000 .byte %10101000 ; sprite 3 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 .shipSpritesUp: ; sprite 0 .byte 100000 .byte 100000 .byte %01010000 .byte %11111000 .byte %10101000 ; sprite 1 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 ; sprite 2 .byte 100000 .byte 100000 .byte %01110000 .byte %11011000 .byte %10101000 ; sprite 3 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 .shipSpritesDown: .byte 100000 .byte 100000 .byte %01010000 .byte %11111000 .byte %10101000 ; sprite 1 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 ; sprite 2 .byte 100000 .byte 100000 .byte %01110000 .byte %11011000 .byte %10101000 ; sprite 3 .byte 100000 .byte 100000 .byte %01010000 .byte %11011000 .byte %10101000 alien1Sprites: .alien1SpritesUp: ;sprite 1 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 2 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %10000100 ;sprite 3 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 4 .byte 110000 .byte %01111000 .byte %11001100 .byte %11111100 .byte 110000 .alien1SpritesDown: ;sprite 1 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 2 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %10000100 ;sprite 3 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 4 .byte 110000 .byte %01111000 .byte %11001100 .byte %11111100 .byte 110000 .alien1SpritesLeft: ;sprite 1 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 2 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %10000100 ;sprite 3 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 4 .byte 110000 .byte %01111000 .byte %11001100 .byte %11111100 .byte 110000 .alien1SpritesRight: ;sprite 1 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 2 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %10000100 ;sprite 3 .byte 110000 .byte %01111000 .byte %10110100 .byte %11111100 .byte %01001000 ;sprite 4 .byte 110000 .byte %01111000 .byte %11001100 .byte %11111100 .byte 110000 ;score scoreGraphic.parameters: .byte red ; color 1 .byte bkg ; color 2 .byte 78 ; x position .byte 1 ; y position .byte 19 ; width .byte 4 ; height .word scoreGraphic.data ; address for the graphics scoreGraphic.data: .byte %01100110, %01001100, %11111001, 010101 .byte %01010001, %10100010, %10110011, %01100011 .byte 100101, %01110000 highGraphic.parameters: .byte red ; color 1 .byte bkg ; color 2 .byte 78 ; x position .byte 19 ; y position .byte 16 ; width .byte 4 ; height .word highGraphic.data ; address for the graphics highGraphic.data: .byte %10101110, %01101010 .byte %10100100, %10001010 .byte %11100100, %10101110 .byte %10101110, %01101010 numberGraphics: .byte %11110110, %11011110 ; 0 .byte %01011001, 101110 ; 1 .byte %11100111, %11001110 ; 2 .byte %11100111, %10011110 ; 3 .byte %10110111, %10010010 ; 4 .byte %11110011, %10011110 ; 5 .byte %11110011, %11011110 ; 6 .byte %11100100, %10010010 ; 7 .byte %11110111, %11011110 ; 8 .byte %11110111, %10011110 ; 9 org [$800 + [2 * $400] -$1] .byte 0 It compiles allright and ship moves right or left only when you hold joystick that way. To better understand the code you could try and add more comments.
-
I've assembled it with dasm and tried to run it in MESS, but it didnt start up at all, didn't know why... ... until I remebered that I needed to "even off" the bin-size. I added these two rows last in the program - evens out to full 1024 byte units: org [$800 + [XXXX * $400] -$1] .byte 0 XXXX = 2 for a 2kByte file, 4 for a 4kB size file etc. Blackbird has added his signature last in the code: .byte "·Blackbird· 2006" But then you need to increase the number of bytes you subtract from the org-statement above (subtracts only 1 byte). I see the problem now, the Ship (and a good-looking ship it is) continues to float.... I'll check it out. BTW Here's the register table for Pac-man, variables are used together with a macro to set ISAR easily: ;--------------------------------------------------------------------------- ; Register Reference ;--------------------------------------------------------------------------- ; The registers in the F8 are used as both RAM and registers for ; this game. The reference is as follows: ; score must have a 4 in the octal one's digit, to work with score.add ; registers 020 - 027 ; hi-score is backed up in RAM, registers can be ; used for other things inside the game loop HISCORE_REG = 020; #16 ATTACK_COUNTER_REG = 020; #16 ATTACK_TIMER_REG = 021; #17 GHOSTS_RELEASED_REG = 022; #18 GHOST_RELEASE_TIMER_REG = 023; #19 SCORE_REG = 024; #20 ; pacman registers (must be in same octet) PACMAN_X_REG = 030; #24 PACMAN_Y_REG = 031; #25 PACMAN_DIRECTION_REG = 032; #26 PACMAN_ANIMINDEX_REG = 033; #27 ; ghost registers (must be in same octet) GHOST_TMP_REG = 034; #28 GHOST_TMP_X_REG = 034; #28 GHOST_TMP_Y_REG = 035; #29 GHOST_TMP_DIR_REG = 036; #30 b7 nested, b6 nest.out GHOST_TMP_ANIM_REG = 037; #31 ; ghost registers (040-057) GHOST_REG = 040 ; #32 GHOST_0_X_REG = 040 ; #32 GHOST_0_Y_REG = 041 ; #33 GHOST_0_DIR_REG = 042 ; #34 GHOST_0_ANIM_REG = 043 ; #35 GHOST_1_X_REG = 044 ; #36 GHOST_1_Y_REG = 045 ; #37 GHOST_1_DIR_REG = 046 ; #38 GHOST_1_ANIM_REG = 047 ; #39 GHOST_2_X_REG = 050 ; #40 GHOST_2_Y_REG = 051 ; #41 GHOST_2_DIR_REG = 052 ; #42 GHOST_2_ANIM_REG = 053 ; #43 GHOST_3_X_REG = 054 ; #44 GHOST_3_Y_REG = 055 ; #45 GHOST_3_DIR_REG = 056 ; #46 GHOST_3_ANIM_REG = 057 ; #47 ; level registers (must be in same octet) LEVEL_NUMBER_REG = 060 ; #48 GHOST_NUMBER_REG = 061 ; #49 PACMAN_LIVES_REG = 062 ; #50 b7 pac collision, b6 player 1/2, b5 2ply game GHOSTS_SLOW_REG = 063 ; #51 ghost off loop b7-6, slow ghost b5 POWERPELLETS_REG = 063 ; #51 bits 4-0 GHOST_EATABLE_REG = 064 ; #52 b0 G0, b1 G1, b2 G2, b3 G3 ; upper four bits "is eaten" SLOW_TIMER_REG = 065 ; #53 GLOBAL_TIMER_REG = 066 ; #54 BONUS_PRIZE_REG = 067 ; #55 keeps track of when bonus prize is plotted BONUS_PRIZE_ON = 070 ; #56 ;--------------------------------------------------------------------------- It helps when you are programming, keeping track of what the registers are used for. Using the SETISAR dasm-macro by Blackbird makes it easier to set the ISAR: ;------------------------- ; SETISAR ; Original Author: Blackbird ; Sets the ISAR to a register number, using lisu and lisl SETISAR HISCORE_REG MAC SETISAR lisu [[{1}] >> 3] lisl [[{1}] & %111] ENDM Then you simply write this in your code: SETISAR HISCORE_REG instead of lisu 2 lisl 0 Changing the ISAR a lot this helps.
-
Another fun situation i am now dealing with on ebay!
e5frog replied to Atarimania75's topic in Auction Central
How would you know it didn't work if it was NIB without opening it up and testing it? Buying a sealed game is kind of like a lottery, best thing is to never open it up - then it will also keep its value. -
Deal I need them . I can buy them for the 141 or we can work out a trade I'll PM you Cash is OK, but I'd rather make a trade as you have some of those rare ones I don't. BTW - you should add the "Barco Challenger" as well, they seemed to use the same cart labels as original Fairchild, but made their own instruction booklets. There is also a relabeled Fairchild V.E.S. called "Dumont" but I don't know of any instructions or cart label variations there...
-
Sometimes you can see the bond-wires poke through the "blob" - no wonder these break. It's probably #1 instructionlabel, as to my knowledge these are the most common re-labeled carts, Zircons idea of recycling or rather reusing, they could have removed the old labels...
-
Considering the extremely good condition, it would only take two bidders with a well filled bank-account at the end of the month to make this type of item rise ridiculously high... But as you say Ian, interest in this early system isn't that large and if the "rich" collectors already have this particular cart it might go too cheap. As for a boxed Democart I wouldn't sell it for less than $100 cash, but I might trade it for less value if I got something I wanted for a long time. I'm also interested in your extra foreign Fairchild carts Ianoid... I have quite a few holes in my collection. Also missing a few US, like a complete #15, 18 and others...
-
First thing I noticed was this: setupShip: lisu 4 lisl 3 li SHIP_START_X lr I, A li SHIP_START_Y lr I, A li 000001 lr I, A li 0 lr S, A ;setupAlien1: ;lisu 4 ;lisl 3 ;li ALIEN1_START_X ;lr I, A ;li ALIEN1_START_Y ;lr I, A ;li 000001 ;lr I, A ;li 0 ;lr S, A You're loading the Alien coordinates into the same registers as the ship's coordinates (lisu 4; lisl 3 -> OCTAL:43) As it's commented away I don't know if the code is actually updated, just wanted to point it out. Same problem in the clearAlien1-routine it loads the same coordinates as the Ship. If you're only going to have one image for the ship you can remove the animation of it, it saves CPU-time. Another thought is that as you're using basically a square for the playfield you can remove all the tile-checking and implement boundary-checks instead - as I described earlier. Just check that the x and y coordinates don't pass the highest and lowest allowed values. The whole checkIntersection-routine can be replaced by a simple boundary check. To start with, using subroutines are very handy, but as the game progress and you might need to increase speed - removing them and writing it directly into the code speed things up. Also the pushk and popk routines are only necessary when using several subroutines "on top of eachother". These also use a lot of CPU-time. To reduce sprite-flicker try to do as little as possible between erasing and redrawing the sprites. Perhaps reading the handcontroller can be done before erasing. Set up a table with all registers you intend to use and for what they are used, like this: ; r0-r31 general-purpose registers ; r33 level number ; r34 (unused) ; r35 pac-man x coordinate ; r36 pac-man y coordinate ; r37 pac-man direction ; r38 animation index Perhaps writing the numbers octally also will help keeping track of the correct registers. Like your Ship coordinates starts at x: OCTAL 43 which is register 35, y: r 36 (octal 44) You set the ISAR register with lisu (Load ISAR upper) and lisl, then the li A, I increases ISAR when you load A from the register ISAR points to. I'll try it out in MESS when I get home.
-
Thanks, I'll have a look at it later today. There is a complete and almost fully working (I've detected some bugs at random times but not been able to reproduce them). I've tried to mimic the same monster-behaviour as the original Pac-man, calculating where to go next according to certain rules. I've tried studying the original code but as we don't use the same type of blocks and coordinates I couldn't use it straight off. Adding an enemy also needs adding delete and redraw of the enemy, you could use the same sprite-draw routine if you copy the coordinates to a common register before deleting and redrawing it. You need to add enemy-update somewhere before or after updating your own player (if they're supposed to run at the same speed). Using the same technique, erasing, updating coordinates and then redraw. You also need to redraw any graphics that the enemy has collided with after erasing it - as for example other enemies or background graphics will also be deleted. The enemy coordinates can be set to certain rules or read preset data to move the desired way. A first try could perhaps be just to make the enemy follow player x or/and y coordinates. Like Pac-man it could perhaps aim at a point near the player or similar... I'll send you some code when I manage to get home to my own computer. Happy coding! / e5frog
-
If it has the "rubber-blobs" these are most often visible when peeking through the opened hatch of the videocart. May I ask what the bottom label is, is it a #1 instruction label or a Democart-label (or maybe something else)? If you hold it up in front of a lit lightbulb it's pretty easy to determine. Thanks!
-
OK, here's what I've got to offer (I'm assuming you only want one of each item): SABA: Instructions 9, 14 and 20 Luxor: Complete: 1, 3, 9 Box+cart: 4, 11 Loose Cart: 2, 13 and 14 ITT: Loose Cart: 7 If you want them all it adds up to a value of $141 according to your pricelist. I'm interested in getting one of those hard to find items you mention above.
-
If it's working - (if it has a PCB with rubbery-like blobs on top of the chips they're often not working - perhaps one reason for the shortage) - you should be able to get at least $100 for this complete and most excellent item (I'm interested myself). If it's the "rubbery-blob"-type of PCB it's usually also switchable to the Slot Machine game by changing a jumper inside the cart. So sometimes a non-working #19 can be changed into a working #22 and vice versa. I have a bunch of carts you were interested in, I would sure like to do a trade. e5frog
-
In Pac-Man we delete and redraw the sprite every update (and also the monsters). As the position is stored in two registers (or copied into before being drawn) you can read those registers and compare the value to what the values are at your extreme values. If they're too much or too litte you change the register to the closest extreme value before redrawing again. Like this: Read controller Delete object at current position Change coordinate registers x, y (or however you set position) according to hand controller movement Compare new values to extreme points Change values if outside allowed values Draw object at new or unchanged position If you store the old position in other registers and delete object just before you redraw it at the new position you'll get less flicker. Let's say you have coordinates x: [0,50] and y: [0,50], after a controller movement the x register is 51, you compare it to 50 and result is greater (or compare to 51 and get equal) -> change value back to 50 and the object will stay at that position. Collisions can be done the same way, compare x and y coordinates, if the coordinates are the same (or within a certain range) there's a collision. I don't know any other way to do it. You could compare one coordinate first, if it isn't close, skip checking the other one. When the object goes outside the screen it affects (one or both) the "palette setting columns" in the screen memory which apparently gets set to Black/white at that bar/bars. If you'd like some more detailed help, let me know, I can assist you better if you share your code. e5frog
-
I have some of these, I DO have a few Luxor ones, complete. Let me get back to you on which ones I've got. I'd sure like to "add up" to one of those hard to get ones. Is the Checkers cart with the colored or white box? e5frog
-
Fixed it, now onto figuring out controls and adding enemy sprites... wish there were more resources. Hi there! I'm the co-author of Pac-Man on Channel F, I can probably help you... It would be nice to try out your program. Any screenshots? Isn't the WIKI up again, I got an email from Blackbird a few weeks ago saying he was ready for another go at the game. Let me know. e5frog
