7425
DEMO -> Other
© Dirty Minds (2003)
 
 
 
A Bouncing Pixel
cpc
 
 

NOTICE / MANUAL

TXT (2)

NOTICE TEXTE n° 1 (1.29 Ko)

I have provided the code too, to show that it is exactly 256b. Download Winape32 emulator, run it, press F1 to go to Basic, press F6 to open the assembler, Open the asm file, Ctrl+F9 to Assemble, write CALL &4000 in Basic. 256b intros on CPC? This must be the first. Well,. every file on AMSDOS takes at least 1kb. This one eats 256 bytes of Z80 code. Not inside the disk though. What's the point of 256b intros on CPC, when there is more space eaten for nothing on the disk? (CP/M perhaps?). You tell me. Size optimizing on Z80 seems to be really fun. There are a lot of opcodes taking just one byte. You can easilly count the rest. Much registers to exchange, lotsa tricks to try! I'd prefer to code a 1kb (almost, because of 128b file header) intro for the next time. If I get moody enough for real CPC coding.. Epilogue. I have developed this shitty thing during a night at DemoFeast. Ment0r was coding a bouncing pixel on the PC, jff, so I decided to do something similar on my CPC. I had seen that what I had, was less than 256b, so I thought it would be a nasty idea to make a 256b release out of it. I opened the code today and cleaned up some bytes, then I decided to output some text and leave it as it is. I know it must be my lamest release ever, but who cares?!@ Optimus
 

NOTICE TEXTE n° 2 (1.58 Ko)

org &4000 xor a:call &bc0e ; --- Text --- ld hl,atext more: ld a,(hl) inc l or a jr z,textout ld b,1 cp 11 jr nz,normaltext ld b,a dec a normaltext: call 47962 dec b jr nz,normaltext jr more atext: db 10 db " A Bouncing Pixel!",11,13 db "Optimus/Dirty Minds",11,13 db " 256b shit",0 textout: ; ---- Generating Videoram Y addresses ---- ld hl,49152 ld ix,&4200:ld iy,&4300 ld b,25 char25: ld de,2048 ld c,d ;c=8 line8: ld a,h:ld (ix),a:inc ix ld a,l:ld (iy),a:inc iy add hl,de x: dec c y: jr nz,line8 ld de,65536-16384+80 add hl,de dec b jr nz,char25 ; ---- Main ---- main: ;&3c = inc a ;&3d = dec a ; --- Direction --- ld hl,ymov ld a,(y) or a jr nz,noy0 ld (hl),&3c jr noy198 noy0: cp 198 jr nz,noy198 ld (hl),&3d noy198: ld hl,xmov ld a,(x) or a jr nz,nox0 ld (hl),&3c jr nox159 nox0: cp 159 jr nz,nox159 ld (hl),&3d nox159: ; --- Calculate address --- ld h,&42 ld a,(y) ymov: inc a:ld (y),a ld l,a ld d,(hl):inc h:ld e,(hl):ex de,hl ld a,(x) xmov: inc a:ld (x),a ld b,0:srl a:ld c,a add hl,bc ld a,(x) and 1 ;ld a,%10000000 ld a,%00100000 jr z,noright srl a noright: ld b,a ; ---- Double Pixel ---- ld c,(hl) ld (hl),b ld a,(y) and 7 cp 7 jr nz,syn2048 ld de,65536-14336+80 jr no2048 syn2048: ld de,2048 no2048: push hl:add hl,de:push hl ld d,(hl):ld (hl),b ; --- Vsync --- ld b,&f5 vsync0: in a,(c) rra jr nc,vsync0 halt pop hl:ld (hl),d:pop hl:ld (hl),c ld bc,&7f00 out (c),c ld a,&54 out (c),a inc c out (c),c inc a out (c),a jp main
 



Goto Top
CPC-POWER/CPCSOFTS, programming by Kukulcan © 2007-2024 all rights reserved.
Reproduction forbidden without any express authorization. All the game titles used belong to their respective owners.
Hébergement Web, Mail et serveurs de jeux haute performance