Jump to content
IGNORED

rainbow fuji logo with sourcecode on github


tschak909

Recommended Posts

13 hours ago, tschak909 said:

The graphic itself is a standard Micropainter image, that is, 160x192, 2 bits per pixel. The last four bytes of the palette data aren't used, and all the colors, save COLUBK are set to $0E.

 

If someone has a better pic, then fold it in.  :)

 

-Thom

The rainbow looked kind of wrong to me, so I´ve changed your code a bit. In the main loop you now can set the rainbow to appear on on the Logo, the Text or the Background. Or all at once.

Just didn´t change the picture.

 

	;; Atari Logo with rainbow Fuji
	;; Author: Thom Cherryhomes <thom.cherryhomes@gmail.com>
	;; Edited by skr <sascha@abbuc.de>

C0	=	$D01A
DL	=	$F4
DH	=	$Ff5	
SDLSTL	=	$0230
SDLSTH	=	$0231
VCOUNT	=	$D40A
	
	ORG	$2200
      
START	
	LDA	SDLSTL
	STA	DL
	LDA	SDLSTH
	STA	DH

	;; SET COLOR REGISTERS
	LDA #$0E	;Color
	STA $02C4	;Set Color for Logo
	STA $02C5	;Set Color for Text
	
	;; SET DISPLAY LIST
	LDA	#$00
	STA	SDLSTL
	LDA	#$29
	STA	SDLSTH
	
LOOP	lda $d40b	;Load VCOUNT 
	clc 
	adc 20 			;Add counter 
	sta VCOUNT
	;sta $d01a		;Rainbow on Background
	sta $d016		;Rainbow on Logo
	sta $d017		;Rainbow on Text
	jmp loop	

	ORG	$2900

DLST
	.BYTE	$70,$70,$70
	.BYTE   $4E,$50,$31
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E
	.BYTE	$4E,$00,$40
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE	$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE	$41,$00,$29
	
	ORG 	$3150	;Load image to this address

	INS	"atari.mic"
	
	RUN	START

 

  • Like 1
Link to comment
Share on other sites

btw, if you want to scroll the rainbow up, a simple change from dey to iny in DLI has to be done:

	.proc dli
	sta rega
	stx regx
	sty regy

	mva >fnt chbase
	sta wsync
	ldy $14
	ldx #85
lp	sty color1
	sty color2
	sty color0
	sta wsync
	iny			;this was dey for rainbow down
	dex
	bpl lp
	mva #0 color2
	mva #$e color1
	sta wsync
	ldy regy
	ldx regx
	lda rega
	rti
	.endp

  • Like 2
Link to comment
Share on other sites

37 minutes ago, pps said:

btw, if you want to scroll the rainbow up, a simple change from dey to iny in DLI has to be done:


	.proc dli
	sta rega
	stx regx
	sty regy

	mva >fnt chbase
	sta wsync
	ldy $14
	ldx #85
lp	sty color1
	sty color2
	sty color0
	sta wsync
	iny			;this was dey for rainbow down
	dex
	bpl lp
	mva #0 color2
	mva #$e color1
	sta wsync
	ldy regy
	ldx regx
	lda rega
	rti
	.endp

 

suggestion- add velocity and have it reverse, going one way and then the other !  :)

Edited by _The Doctor__
  • Like 2
Link to comment
Share on other sites

Changing direction in Thom´s code works with using SBC instead of ADC.

You can also have both directions at once. I´ve just made Subroutines "SD" (Scroll Down) and "SU" (Scroll Up). Looks like this:

 

	;; Atari Logo with rainbow Fuji
	;; Author: Thom Cherryhomes <thom.cherryhomes@gmail.com>
	;; Edited by skr <sascha@abbuc.de>

C0	=	$D01A
DL	=	$F4
DH	=	$Ff5
	
SDLSTL	=	$0230
SDLSTH	=	$0231
VCOUNT	=	$D40A
	
	ORG	$2200

START	
	LDA	SDLSTL
	STA	DL
	LDA	SDLSTH
	STA	DH

	;; SET COLOR REGISTERS

	LDA	#$0E	;Color
	STA	$02C4	;Set Color for Logo
	STA $02C5	;Set Color for Text
	
	;; SET DISPLAY LIST

	LDA	#$00
	STA	SDLSTL
	LDA	#$29
	STA	SDLSTH
	
LOOP
	JSR SD
	sta $d01a		;Rainbow on Background
	JSR SU
	sta $d016		;Rainbow on Logo	
	sta $d017		;Rainbow on Text
	jmp loop	

SD	lda $d40b	;Load VCOUNT 
	clc
	adc 20 			;Add counter sbc scrolls down, adc scrolls up 
	sta VCOUNT
	RTS
	
SU	lda $d40b	;Load VCOUNT 
	clc
	sbc 20 			;Add counter sbc scrolls down, adc scrolls up 
	sta VCOUNT
	RTS	

	ORG	$2900

DLST
	.BYTE	$70,$70,$70
	.BYTE   $4E,$50,$31
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E
	.BYTE	$4E,$00,$40
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE   $0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE	$0E,$0E,$0E,$0E,$0E,$0E,$0E
	.BYTE	$41,$00,$29
	
	ORG 	$3150	;Load image to this address

	INS	"atari.mic"
	
	RUN	START

  • Like 1
Link to comment
Share on other sites

1 hour ago, _The Doctor__ said:

suggestion- add velocity and have it reverse, going one way and then the other !  :)

not exactly velocity, but...

new DLI code for that:

	.proc dli
	sta rega
	stx regx
	sty regy

	mva >fnt chbase
	sta wsync
	lda $13
	cmp store
	bne chg
furth	ldy $14
	ldx #85
lp	sty color1
	sty color2
	sty color0
	sta wsync
what	iny
	dex
	bpl lp
	mva #0 color2
	mva #$e color1
	sta wsync
	ldy regy
	ldx regx
	lda rega
	rti
;-------
chg
	lda what
	cmp #$88	;dey?
	bne c_dey
;c_iny
	lda #$c8	;iny
	sta what
	mva $13 store
	jmp furth
c_dey
	lda #$88	;dey
	sta what
	mva $13 store
	jmp furth
	.endp

store is additional .zpvar .byte

rainbow_fuji_up_down.xex

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you all guys, I´ve learned so much (I´m a total noob, srsly).

I very much like @ascrnet´s way using text mode. Have to check out later, how to have two different scroll directions in one line with that.

The last thing I didn´t understand was the "compressed" graphics, but changing the DL to Antic Mode D did the trick, as it uses 2 scanlines. So this is my last video:

  • Like 1
Link to comment
Share on other sites

12 minutes ago, tschak909 said:

See, this is what makes me smile, people jumping in and hacking on stuff. :)

 

-Thom

 

You make me feel like 12 years old again. Wanted to do exactly this stuff then, but no other Atarians around, no literature, no internet etc.
Little Sascha will go to bed with a big smile in his face. :)

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, Philsan said:

Nice logo shape. Perhaps scrolling is too fast (worst in NTSC machines).

it's direct so it's super fast ?

 

thanks to all who have shared their source code, you learn a lot. i share my second improved version with the rainbow in DLI with VBI. is there a way to disable the VBI before exiting the program? ?

Fuji.xex

  • Thanks 1
Link to comment
Share on other sites

13 minutes ago, ascrnet said:

it's direct so it's super fast ?

 

thanks to all who have shared their source code, you learn a lot. i share my second improved version with the rainbow in DLI with VBI. is there a way to disable the VBI before exiting the program? ?

Fuji.xex 974 B · 0 downloads

Simply include another VBI, that just jumps to xitvbv and set it as VBI before exit or better save original VBI and DL and reset them before exit.

  • Like 1
Link to comment
Share on other sites

17 minutes ago, ascrnet said:

it's direct so it's super fast ?

 

thanks to all who have shared their source code, you learn a lot. i share my second improved version with the rainbow in DLI with VBI. is there a way to disable the VBI before exiting the program? ?

Fuji.xex 974 B · 1 download

save original VBI and DL and reset before exit.

 

Edited by tschak909
Link to comment
Share on other sites

Ok, last one by me...

ATARI would have added the registration mark back in the days, so I added it. Rainbow is taller here and you can exit to a warm reset.

 

rainbow_fuji_r_up_down.xex

Source code for all will be added to my github place in a few minutes. Link is in my signature.

Edited by pps
edit: correted wrong .xex
  • Like 5
  • Thanks 2
Link to comment
Share on other sites

16 hours ago, pps said:

Simply include another VBI, that just jumps to xitvbv and set it as VBI before exit or better save original VBI and DL and reset them before exit.

thanks for the information ?

16 hours ago, tschak909 said:

save original VBI and DL and reset before exit.

 

thanks for the information ?

16 hours ago, tane said:

+ exit also with Start & Trigger.

ok

 

now I share my third version ?

Fuji.xex

Leaving the rainbow in DLI and VBI leaves it compatible for PAL and NTSC I learned.?
I also improved the blackout effect of the ATARI word and last but not least, thanks to all of you who made your own versions, we learn a lot from you.

  • Like 4
Link to comment
Share on other sites

  • 3 months later...
On 4/24/2021 at 11:12 PM, ascrnet said:

is there a way to disable the VBI before exiting the program? ?

 

On 4/26/2021 at 9:27 PM, ascrnet said:

Now my fourth version with the rainbow down and up.

This version (latest checked in Github) is not working with some programs. For example when adding an image (G2F) thereafter, it will not work all times, the image doesn't start.

 

Is there a way to restore the system to its default before exit the program? What to add here?:

exit
   jmp WARMSV

 

 

If in the G2F code is commented this line, it helps, but I'd like to have a full compatible Fuji Rainbow Logo program instead of to make hacks to other programs.

; lda:cmp:req $14		;wait 1 frame

It breaks out of the loop at $2C05:

2C03: A5 14             LDA RTCLOK+2
2C05: C5 14     L2C05   CMP RTCLOK+2
2C07: F0 FC             BEQ $2C05
2C09: 78                SEI

 

 

Note: not tested specifically with this small G2F code. Pasted here in order to know what commands are used with G2F.

/***************************************/
/*  Use MADS http://mads.atari8.info/  */
/*  Mode: DLI (char mode)              */
/***************************************/

	icl "test.h"

	org $f0

fcnt	.ds 2
fadr	.ds 2
fhlp	.ds 2
cloc	.ds 1
regA	.ds 1
regX	.ds 1
regY	.ds 1

WIDTH	= 40
HEIGHT	= 30

; ---	BASIC switch OFF
;	org $2000\ mva #$ff portb\ rts\ ini $2000

; ---	MAIN PROGRAM
	org $2000
ant	dta $44,a(scr)
	dta $04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04
	dta $04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04,$04
	dta $41,a(ant)

scr	ins "test.scr"

	.ds 0*40

	.ALIGN $0400
fnt	ins "test.fnt"

	ift USESPRITES
	.ALIGN $0800
pmg	.ds $0300
	ift FADECHR = 0
	SPRITES
	els
	.ds $500
	eif
	eif

main
; ---	init PMG

	ift USESPRITES
	mva >pmg pmbase		;missiles and players data address
	mva #$03 pmcntl		;enable players and missiles
	eif

	lda:cmp:req $14		;wait 1 frame

	sei			;stop IRQ interrupts
	mva #$00 nmien		;stop NMI interrupts
	sta dmactl
	mva #$fe portb		;switch off ROM to get 16k more ram

	mwa #NMI $fffa		;new NMI handler

	mva #$c0 nmien		;switch on NMI+DLI again

	ift CHANGES		;if label CHANGES defined

_lp	lda trig0		; FIRE #0
	beq stop

	lda trig1		; FIRE #1
	beq stop

	lda consol		; START
	and #1
	beq stop

	lda skctl
	and #$04
	bne _lp			;wait to press any key; here you can put any own routine

	els

null	jmp DLI.dli1		;CPU is busy here, so no more routines allowed

	eif


stop
	mva #$00 pmcntl		;PMG disabled
	tax
	sta:rne hposp0,x+

	mva #$ff portb		;ROM switch on
	mva #$40 nmien		;only NMI interrupts, DLI disabled
	cli			;IRQ enabled

	rts			;return to ... DOS

; ---	DLI PROGRAM

.local	DLI

	?old_dli = *

	ift !CHANGES

dli1	lda trig0		; FIRE #0
	beq stop

	lda trig1		; FIRE #1
	beq stop

	lda consol		; START
	and #1
	beq stop

	lda skctl
	and #$04
	beq stop

	lda vcount
	cmp #$02
	bne dli1

	:3 sta wsync

	jmp NMI.quit
	eif


dli_start


.endl

; ---

CHANGES = 1
FADECHR	= 0

SCHR	= 127

; ---

.proc	NMI

	bit nmist
	bpl VBL

	jmp DLI.dli_start
dliv	equ *-2

VBL
	sta regA
	stx regX
	sty regY

	sta nmist		;reset NMI flag

	mwa #ant dlptr		;ANTIC address program

	mva #@dmactl(standard|dma|lineX1|players|missiles) dmactl	;set new screen width

	inc cloc		;little timer

; Initial values

	lda >fnt+$400*$00
	sta chbase
c0	lda #$00
	sta colbak
c1	lda #$04
	sta color0
c2	lda #$06
	sta color1
c3	lda #$08
	sta color2
c4	lda #$0E
	sta color3
	lda #$02
	sta chrctl
	lda #$04
	sta gtictl
x0	lda #$00
	sta hposp0
	sta hposp1
	sta hposp2
	sta hposp3
	sta hposm0
	sta hposm1
	sta hposm2
	sta hposm3
	sta sizep0
	sta sizep1
	sta sizep2
	sta sizep3
	sta sizem
	sta colpm0
	sta colpm1
	sta colpm2
	sta colpm3

	mwa #DLI.dli_start dliv	;set the first address of DLI interrupt

;this area is for yours routines

quit
	lda regA
	ldx regX
	ldy regY
	rti

.endp

; ---
	run main
; ---

	opt l-

.MACRO	SPRITES
missiles
	.ds $100
player0
	.ds $100
player1
	.ds $100
player2
	.ds $100
player3
	.ds $100
.ENDM

USESPRITES = 0

.MACRO	DLINEW
	mva <:1 NMI.dliv
	ift [>?old_dli]<>[>:1]
	mva >:1 NMI.dliv+1
	eif

	ift :2
	lda regA
	eif

	ift :3
	ldx regX
	eif

	ift :4
	ldy regY
	eif

	rti

	.def ?old_dli = *
.ENDM

 

example G2F.zip

Link to comment
Share on other sites

On 4/24/2021 at 1:27 AM, ascrnet said:

First of all thanks for sharing the code on github ?, but it is strange your version of fuji. There is a game that has a very good one of course it doesn't use the whole screen.

atari.png.a27cbab9d991e7cc078edb2c7063b230.png

Regards

This the one Atari UK provided to developers - used on several of the final games produced for the 8bit line...

 

It was the same data as the Xanth F/X Swan demo - https://demozoo.org/productions/98552/

 

      sTeVE

Edited by Jetboot Jack
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...