Jump to content

Forrest picture: Difference between revisions

From CPCWiki - THE Amstrad CPC encyclopedia!
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:Graphic]]
'''Forrest Picture''' is a picture drawn by [[Mr. Lou]]s girlfriend, and is a demonstration on how to use the graphic abilities of the CPC.
'''Forrest Picture''' is a picture drawn by [[Mr. Lou]]s girlfriend, and is a demonstration on how to use the graphic abilities of the CPC.


The picture uses [[mode 1]] of the CPC. The graphic mode is limited to 4 simultanious colors. After publication the picture became the subject on how to break the 4 colour limit in mode 1 using [[rasters]]. Subsequent [[Tom & Jerry of GPA|T&J]] wrote a small program showing how the picture would look like using rasters generated by the [[Gate Array|gate array]].
The picture uses [[Video modes|mode 1]] of the CPC. The graphic mode is limited to 4 simultanious colors. After publication the picture became the subject on how to break the 4 colour limit in mode 1 using [[rasters]]. Subsequent [[Tom & Jerry of GPA|T&J]] wrote a small program showing how the picture would look like using rasters generated by the [[Gate Array|gate array]].


''Original picture''
''Original picture''

Latest revision as of 02:40, 17 December 2010

Forrest Picture is a picture drawn by Mr. Lous girlfriend, and is a demonstration on how to use the graphic abilities of the CPC.

The picture uses mode 1 of the CPC. The graphic mode is limited to 4 simultanious colors. After publication the picture became the subject on how to break the 4 colour limit in mode 1 using rasters. Subsequent T&J wrote a small program showing how the picture would look like using rasters generated by the gate array.

Original picture

Error creating thumbnail: Unable to save thumbnail to destination

Picture using rasters

Error creating thumbnail: Unable to save thumbnail to destination

Sourcecode

<geshi lang=z80>

Example of rasters in a MODE 1 screen
T&J/GPA in 2009
Done under WINAPE
Not tested on a real CPC, so maybe it needs some timing adjustments
Wait for Color Lines ! Rasters inside !!

ORG &9000 NOLIST WRITE "RASTERS.BIN"

black equ &54 grey equ &41 green_19 equ &51 red_6 equ &4C blue_1 equ &44 blue_11 equ &57 blue_14 equ &5F bleu_clair equ &53

violet equ &58

JP booter

save38 defw &0

Booter DI LD HL,(&38) LD (save38),HL LD HL,&C9FB LD (&38),HL EI


main DI LD B,&F5 sync IN A,(C) RRA JR NC,sync

CALL scan_spacekey CP &7F JP Z,endit

LD BC,&7F02  ; sky OUT (C),C LD A,blue_11 OUT (C),A

EI

HALT

HALT

LD HL,&FDD0 wait1 INC HL LD A,H AND A JR NZ,wait1

LD BC,&7F02 OUT (C),C LD A,&5F OUT (C),A

HALT HALT

LD HL,&FFC0 wait2 INC HL LD A,H AND A JR NZ,wait2

LD BC,&7F02 ; board of the lake OUT (C),C LD A,grey OUT (C),A

LD HL,&FF74 wait3 INC HL LD A,H AND A JR NZ,wait3

LD BC,&7F02 OUT (C),C

LD D,green_19 LD E,red_6

DI

LD A,&40

split1 OUT (C),E  ; red mushrooms PUSH AF NOP NOP NOP NOP NOP OUT (C),D  ; green mushroom

NOP NOP NOP

LD A,&9 waitsp1 DEC A JR NZ,waitsp1

POP AF DEC A JR NZ,split1

JP main

endit

LD BC,&7F02  ; sky OUT (C),C LD A,blue_14 OUT (C),A

LD HL,(save38) DI LD (&38),HL EI RET

scan_spacekey

LD BC,&F40E OUT (C),C LD BC,&F6C0 OUT (C),C LD C,&0 OUT (C),C LD BC,&F792 OUT (C),C LD BC,&F645 OUT (C),C LD B,&F4 IN A,(C) LD BC,&F782 OUT (C),C LD BC,&F600 OUT (C),C RET </geshi>

Download

DSK image with picture and source code

If rasters provide improvement is up for debate at:

CPCWIKI forum entry