NewsProductsSprinterSupportDownloadSprinter ForumAbout usLinksSite map Russian site

Russian
   >> Программирование для компьютера Sprinter
Thread views: 229 View all threadsNext thread*Threaded Mode

Pages in this thread: 1 | 2 | 3 | 4 | (show all)
cr0acker
(member)
2003/05/28 10:33
Re: Графика new [re: Shaos]Reply to this post

Вот сейчас MacBuster^xtm сказал, что мол 256 строк подрубается только оддна строка за раз по Y_Port, и с ней уже ведётся работа! Вот и всё что я хотел услышать:)



Anonymous
(Unregistered)
2003/05/28 16:51
Re: Графика new [re: cr0acker]Reply to this post

спрайты то рулез.... но и произвольные линии не меньший рулез... вот идея есть .CHR(borland BGI) шрифты на Спринтер перевести. Они векторные, масштабируемые и главное МАЛЕНЬКИЕ (4-20 кб). так для их реализации акселератора недостаточно.

идея как?



Shaos
(Registered Developer)
2003/05/28 18:04
Re: Графика new [re: cr0acker]Reply to this post

> Вот сейчас MacBuster^xtm сказал, что мол 256 строк подрубается только оддна строка за раз по Y_Port,
> и с ней уже ведётся работа! Вот и всё что я хотел услышать:)

Ну дык я то же самое и сказал :)

> одна строка только в окно запихивается
> и переключается по порту 89h (см. BACK_SP.A)



Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

Shaos
(Registered Developer)
2003/05/28 18:05
Re: Графика new [re: Anonymous]Reply to this post

> вот идея есть .CHR(borland BGI) шрифты на Спринтер перевести
> идея как?

супергут!


Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

cr0acker
(member)
2003/05/28 19:18
Re: Графика new [re: Shaos]Reply to this post

Ладно верю!



Ivan_MakVIP
(Sprinter Team)
2003/05/28 22:23
Re: Графика new [re: cr0acker]Reply to this post

Вот примеры программ для акселератора и графики
(исходники для свободного использования)



;**************************
; Use Sprinter Accelerator
; for Line & Restangles.
; (c) Peters Plus Ltd.
;**************************
;
; Interrupt - enable
; Stack, Program & Data - in (8000h..BFFFh)
; Video-RAM - in (C000h..FFFFh)
; Video-Data - (0000h..BFFFh)
;
;*******************************************
; This codes is not a library
; It is illustration of Accelerator use only!
; Errors may exists
;*******************************************

Screen_offset EQU 0C000h ; or 0C140h for second graphic screen

Video_Data EQU *** ; 0000h..BFFFh
Color_for_fill EQU *** ; 0..255

Horizontal_offset EQU *** ; 0...319
Vertical_offset EQU *** ; 0...255
Horizontal_size EQU *** ; 1...256
Vertical_size EQU *** ; 1...256

;**************************

Open_video_page:
IN A,(PORT_Y)
LD (SAVE_PY),A ; save port_y
IN A,(PAGE3)
LD (SAVE_PG3),A ; save page3
LD A,50h ; Use 50h for normal mode
; 54h for "no copy in main shadow RAM" mode
; 58h for "FF is transparent" mode
; 5Ch for "no copy in main shadow RAM" and
; "FF is transparent" mode
OUT (PAGE3),A
RET

SAVE_PG3: DB 0FFh
SAVE_PY: DB 0C0h

;**************************

Close_video_page:
LD A,(SAVE_PG3)
OUT (PAGE3),A
LD A,(SAVE_PY)
OUT (PORT_Y),A
RET

;**************************

Horizontal_Line_copy:
LD HL,Video_Data
LD DE,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Horizontal_size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
LD L,L ; Start Accelerator to
; "Copy Line" mode
LD A,(HL) ; Get data line
LD (DE),A ; Put data line
LD B,B ; Stop Accelerator
EI
RET

;**************************

Vertical_Line_copy:
LD HL,Video_Data
LD DE,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Vertical_size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
LD A,A ; Start Accelerator to
; "Copy Vertical Line" mode
LD A,(HL) ; Get data line
LD (DE),A ; Put data line
LD B,B ; Stop Accelerator
EI
RET

;**************************

Horizontal_Line_Fill:
LD DE,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Horizontal_size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
LD A,Color_for_fill
LD C,C ; Start Accelerator to
; "Fill Line" mode
LD (DE),A ; Put line of color
LD B,B ; Stop Accelerator
EI
RET

;**************************

Vertical_Line_Fill:
LD DE,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Vertical_size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
LD A,Color_for_fill
LD E,E ; Start Accelerator to
; "Fill Vertical Line" mode
LD (DE),A ; Put line of color
LD B,B ; Stop Accelerator
EI
RET

;**************************

Draw_Restangle_Data:
LD HL,Video_Data
LD DE,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
LD B,Vertical_size ; 0 is 256
LD C,Horizontal_Size ; 0 is 256

DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Horizontal_Size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
EI

drd_loop:
DI
LD L,L ; Start Accelerator to
; "Copy Line" mode
LD A,(HL) ; Get data line
LD (DE),A ; Put data line
LD B,B ; Stop Accelerator
EI

LD A,C ; Next line data
AND A
JR Z,drd_inc
ADD A,L
LD L,A
JR NC,drd_no_inc
drd_inc:
INC H
drd_no_inc:

IN A,(PORT_Y) ; Next line
INC A
OUT (PORT_Y),A

DJNZ drd_loop ; Sycle

RET

;**************************

Draw_Restangle_Fill:
LD HL,Screen_Offset+Horizontal_Offset
LD A,Vertical_Offset
OUT (PORT_Y),A ; Set vertical offset
LD B,Vertical_size ; 0 is 256

DI
LD D,D ; Start Accelerator to
; "Set Accelerator Length" mode
LD A,Horizontal_Size ; Use direct data or (HL),(BC),(DE) only!
; !!! not ld A,C !!!
LD B,B ; Stop Accelerator
EI

LD C,Color_for_fill

IN A,(PORT_Y)
drf_loop:
DI
LD L,L ; Start Accelerator to
; "Line Line" mode
LD (HL),C ; Put data line
LD B,B ; Stop Accelerator
EI
INC A
OUT (PORT_Y),A
DJNZ drf_loop ; cycle

RET

;**************************




Shaos
(Registered Developer)
2003/05/29 07:36
Re: Графика new [re: Ivan_Mak]Reply to this post

> 54h for "no copy in main shadow RAM" mode

что бы это значило?

Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

Alex_GoryachevAdministrator
(Sprinter Team)
2003/05/29 14:31
Re: Графика new [re: Shaos]Reply to this post

Эти примеры присутствуют в доке по акселератору http://www.petersplus.com/sprinter/accel.htm

---
Sprinter Team
PETERS PLUS LTD

Ivan_MakVIP
(Sprinter Team)
2003/05/29 19:46
Re: Графика new [re: Shaos]Reply to this post

Эти значит, что данные попадают в видео-ОЗУ,
но не попадают в основное ОЗУ, соответствующее видео-памяти.
Т.е. программа может записать на экран новые данные,
а считываться из того же адреса будут старые.

В случае работы со спрайтами, когда надо наложить спрайт, затем восстановить старое изображение, можно использовать этот режим.
Старое изображение останется в тени и его можно восстановить без предварительного сохранения...




cr0acker
(enthusiast)
2003/07/17 21:21
Re: Графика new [re: Ivan_Mak]Reply to this post

Рещил я тута переделать одну софтинку с расширенного экрана GMX на расщиренный экран спринтера. И сразу же наткнулся на грабля, вот типа две фции готорые включют/выключают рсширенный экран! Чё то не пашут.

gmxon ld, a,0
out(#7c),a
ld c, #0a
ld a,1
ld b,2
call #3d13
ld a,0
in a,(#82)
ld (oldwin1),a
in a,(#a2)
ld (oldwin2),a
in a,(#c2)
ld (oldwin3),a
in a,(e2)
ld (oldwin4),a
in a,(#c9)
ld (oldmod),a
ld a,#50
out (#ea2),a
ld a,123
out (#89),a
ld hl,32
ld a,5
ld (hl),a
ld a,(#82)
out (#c9),a
ret

Вместо выполнения фции выше, нас ждёт зависонс




Pages in this thread: 1 | 2 | 3 | 4 | (show all)
View all threadsNext thread*Threaded Mode
Jump to