Printed Amstrad Addict magazine announced, check it out here!
Started by CPCLER, 10:45, 02 July 09
0 Members and 1 Guest are viewing this topic.
;; This example shows a simple method for a overscan;; screen. ;;;; This example will work on CPC, CPC and KC Compact.;;;; This example uses the 6845 CRTC, and shows how;; 32k of pixel data can be displayed by the CRTC.;; This example is compatible with CRTC type 2. (MC6845);;;; the screen is 48x35 visible characters in dimension,;; and each character is 8 scanlines tall.;; the visible window is moved so that the display;; will fill the entire monitor screen. ;; The screen base address is initialised, so that;; MA11=MA10=1, and the internal MA counter of the CRTC will ;; change MA12 during the display, and cause the CRTC to display;; data from a 32k range. The actual visible display uses approx;; 24k of RAM. After this setup, the screen does not need to;; re-initialised for the overscan to be maintained.;;;; the screen is setup for a PAL display.;;;; This example will compile with the MAXAM assembler;; or the built-in assembler of WinAPE32.;;;; Kevin Thacker 2002;; the origin of this source code is not importantorg &4000;; initialise a display window of 48x35 characters;; each character is 8 scanlines tall;; set character height to 8 scanlinesld bc,&bc09out (c),cld bc,&bd00 7out (c),c;; set default horizontal total (set horizontal total to 64 CRTC characters;; = 64 microseconds)ld bc,&bc00out (c),cld bc,&bd00 &3fout (c),c;; set default vertical total (set vertical total to 39 CRTC character-lines)ld bc,&bc04out (c),cld bc,&bd00 38out (c),c;; setup default horizontal and vertical sync widthsld bc,&bc03out (c),cld bc,&bd00 &8eout (c),c;; setup default vertical adjustld bc,&bc05out (c),cld bc,&bd00out (c),c;; setup default interlace & skewld bc,&bc08out (c),cld bc,&bd00out (c),c;; set width of display windowld bc,&bc01out (c),cld bc,&bd00 48out (c),c;; set horizontal sync position; and therefore the;; horizontal position of the display window;; within the monitor displayld bc,&bc02out (c),cld bc,&bd00 48out (c),c;; set height of display windowld bc,&bc06out (c),cld bc,&bd00 35out (c),c;; set vertical sync position; and therefore the;; vertical position of the display window;; within the monitor displayld bc,&bc07out (c),cld bc,&bd00 35out (c),c;; set display start;; force MA11=MA10=1, so that the internal MA;; counter will increment enough to change MA12.;; the displayed data is &0000-&7fffld bc,&bc0cout (c),cld bc,&bd00 &0cout (c),cld bc,&bc0dout (c),cld bc,&bd00 0out (c),cret
Quote from: CPCLER on 10:45, 02 July 09I need to setup a overscan screen on the CPC with screen memory from &8000 - &FFFF but somehow I can't make work.
Quote from: Executioner on 11:23, 02 July 09Just out &bc00,12:out &bd00,&2c will do it (ie. #0c = #0000..7fff, #1c=#4000..#bfff, #2c=#8000..#ffff and #3c=#c000..#3fff).Cheers,Richard
Quote from: Joseman on 22:32, 07 July 09Only point out that out &bc00,12 is mistaken, out &bc00,0c (hex)
Quote from: Executioner on 10:01, 08 July 09&0c is the same as 12 decimal. what you've typed above will only generate a syntax error in BASIC since you missed the & character. I could have typed out &bc00,&c but I usually refer to the register number in decimal, even though my brain works almost equally well in hexadecimal.
Quote from: Joseman on 23:48, 08 July 09Hi allI've playing with overscan this days, and i think that more or less i achieved it, but, the image that the cpc displays have some "extrange" behaviour on the center of the image. the image was converted with convimgcpc:what is wrong? the conversion?
Quote from: Joseman on 00:43, 09 July 09with a simple cas_in_direct :S
Quote from: Executioner on 05:52, 09 July 09Unfortunately, the memory used by the overscan screen will overlap the upper firmware jumpblock and stack if you map it from #8000 to #ffff. This is fine if you're doing it from machine code and you move the stack etc, but it can't easily be done from BASIC. You have very limited options to use overscan from BASIC:1. Set the screen start just higher than BASIC (#0170) and keep your BASIC program very small.2. Use an interrupt routine to change the screen address part way through the screen, in which case you may as well not use the 32K screen mode at all.3. Don't use BASIC, do it from machine code with your own disc/tape loaders.
Quote from: Joseman on 12:10, 09 July 09Changed the screen memory to start on &40, and then load with cas in direct all de 32 k's screen, then, i suppose that none of the firmware or any important call of the cpc are affected...
Page created in 0.094 seconds with 26 queries.