Jump to content
IGNORED

My experiments with Atari 7800


Eagle

Recommended Posts

  • 2 weeks later...
On 10/16/2022 at 6:27 PM, x=usr(1536) said:

I remember when Ecernosoft and I had the non-pictorial version of that conversation.  Good times!

Hahah.

Yeah, I'm practically known for posting a lot ;) 

Edit: I try not to, but you know that I won't really post as little as you all do.

Edited by Ecernosoft
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...

It was a treat to drink my morning coffee and watch this! I always find myself wandering a bit, thinking along the lines of "hmmm... I wonder if they did X to achieve that effect, or maybe it was Y." which adds to the fun.

 

Congrats @Eagle and @playsoft!!! A solid showing from both of you on our little but growing platform! :thumbsup:

  • Like 7
  • Thanks 2
Link to comment
Share on other sites

It looks and sounds superb overall, but what I am really impressed by is the pace.  It would still be impressive at a fraction of the animation speed shown. 

 

I'm really blown away by how quickly and well animated it demonstrates in addition to the exquisite sound.  An absolutely fantastic job!

  • Like 7
Link to comment
Share on other sites

5 minutes ago, Stephen said:

Sorry to be a pest - can I get a timestamp for the particular demo so I don't have to scan through a 7 hour video - the embedded link is not playing, and clicking the link takes me to the beginning of the video on Youtube.

Start at the 5h40m40s mark - it begins a little after that.

 

And this is one impressive demo.  Don't think I've ever seen a version of it before that divides the screen into quadrants like that.

  • Like 2
Link to comment
Share on other sites

@Trebor I had to slow down (I even added some NOPs in loop before) so I decided to make full screen and add some sprites :) 

IMHO was something wrong with music in BadApple, I checked now on my console and sounds different 🤷‍♂️

I'm attaching SN Cart Demo but if you want to watch you need make own cart :D (files attached) 

Also no NTSC friendly and no signature.

SNCartDemo.zip

  • Like 6
Link to comment
Share on other sites

  • 5 weeks later...
On 7/11/2022 at 5:26 PM, Eagle said:

I think VGM is better. Trackers like Deflemask, Furnace, SnevenTracker using VGM.

Like in A8 world they using SAP/RMTLZSS.

There is also nice player in 6502 using Exomizer

https://github.com/simondotm/vgm-player-bbc

 

I am currently porting the driver for cc65 and 7800. I chose the vgc variant with Huffman extra stuffing.

For Wizzy I hope to have small, catchy beats that fit into 4096 bytes that I can play from the $d000 bank.

Learning to compose on Furnace tracker is going to be a real learning experience for me.


But I realized that I do not know where the chips are coded on the SN cart.

 

My guess is:

SN76489AN_BASE = $420
COVOX_PORT = $43F

 

Correct?

 

Edit: I have been enjoying your SN-cart ROMs. Pretty cool things you can do with it. My use of the cart will be much more conventional. The bank switching design really opens up a new way to write small graphical adventures on the 7800. Thanks for a great design @Eagle

 

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, karri said:

Correct?

The cartridge offers 1 Covox channel controlled by the address $0430.

This is compatible with DragonFly (4ch uses $430-$433)

 

SN76489AN_Base = $43F

Remember that you may need few Nops because SN need delay 32 cycles after writing data (but if you will use compression should be no problem, delay will be anyway :) )

Edited by Eagle
  • Thanks 1
Link to comment
Share on other sites

@karri looks like Huffmunch is good for SN

I packed bin files with huffmunch and they looks shorter.

Also player is short, not in RAM and using only 9 zero page bytes.

I made small example - song Collision Chaos from 24508 bytes to 5253 (exo file was 6948)

SN cart has 2x16KB ram, so I copied song in higher 16KB and I put 160B Rayman graphics in to lower 16KB ram

I'm swapping RAM banks on NMI on the bottom of the screen. 

Maria is reading lower Ram and SN player is reading higher Ram.

This is just proof of concept.

Sources and BIN file for Cart attached in zip file

 

 

 

 

 

		icl '\includes\maria.h'
		icl '\includes\macro.asm'

		opt f+h-m+

		org $40
dest 	.ds 2 		;2 bytes
sour	.ds 2
counter .ds 1
temp	.ds 1
temp2	.ds 1
;							
SN_BASE  equ $43F


          org $8000
START
		sei					;Disable interrupts
		cld					;Clear decimal mode
		mva #$07 INPTCTRL
		mva	#$7F CTRL
		mva	#$00 OFFSET
		mva #$00 INPTCTRL
		ldx	#$FF			;Reset stack pointer
		txs 
;Clear zeropage,stack,RAM
		clear_ram $42,$FF	;skip $40&$41 (dest)
		clear_ram $140,$1FF
		clear_ram $1800,$1FFF
		clear_ram $2200,$27FF
		mva #$00 $FFFF 		;clear first 16KB RAM bank and A8/A9 normal
		clear_ram $4000,$7FFF
		mva #$01 $FFFF 		;clear second 16KB RAM bank and A8/A9 normal
		clear_ram $4000,$7FFF
;copy Rayman gfx to first 16KB RAM
		mva #$00 $FFFF 		;first RAM bank and A8/A9 normal
		CopyBanks gfx,$4000,endgfx
;copy song to second 16KB RAM
		mva #$01 $FFFF 		;second RAM bank and A8/A9 normal
		CopyBanks song,$4000,endsong
		jsr huffmunch_init
		mva #$00 $FFFF 		;second RAM bank and A8/A9 normal

		jsr	WaitVBLANK					;wait until no DMA would happen
		mva #<DLL 	DPPL 
		mva #>DLL 	DPPH					;set display list list address
		mva	#$40	CTRL
		mva	#$00	BACKGRND

		mva	#$00 BACKGRND 
		mva #$60 P0C1\ mva #$63 P0C2\ mva #$68 P0C3
		mva #$d2 P1C1\ mva #$d6 P1C2\ mva #$bc P1C3
		mva #$23 P2C1\ mva #$29 P2C2\ mva #$2b P2C3
		mva #$08 P3C1\ mva #$0a P3C2\ mva #$0f P3C3


jmp_end	jmp jmp_end 

	icl 'huffmunch.asm'

huffmunch_init 
		lda #<$4000		;<song
		sta hm_node
		lda #>$4000		;>song
		sta hm_node+1
		ldx #00
		ldy #00
		jsr huffmunch_load
		rts

NMI		phr					;mads macro push registers to stack
		mva #$01 $FFFF 		;second 16KB RAM bank and A8/A9 normal
		jsr Huffmunch_read	;read how many bytes write to SN_base
		sta counter
		lda counter
		beq ?endnmi
@		jsr huffmunch_read
		sta SN_BASE
		sta BACKGRND
		dec counter
		bne @-
?endnmi 
		mva #$00 $FFFF 		;first 16KB RAM bank and A8/A9 normal
		sta BACKGRND
		plr
		rti
;
IRQ		rti
;
WaitVBLANK
WaitVBoff:
		bit		MSTAT
		bmi		WaitVBoff
WaitVBon:
		bit		MSTAT
		bpl		WaitVBon
		rts
DLL
		:3	.byte	$0D,>emptyline,<emptyline
		:12	DLL_Entry #
			.byte	$05,>emptyline,<emptyline
			.byte	$8F,>emptyline,<emptyline
		:10	.byte	$0F,>emptyline,<emptyline

emptyline	.byte 0,0

	
Line0	DL_5byte $4000
Line1	DL_5byte $4000+64
Line2	DL_5byte $4000+128
Line3	DL_5byte $4000+192
Line4	DL_5byte $5000
Line5	DL_5byte $5000+64
Line6	DL_5byte $5000+128
Line7	DL_5byte $5000+192
Line8	DL_5byte $6000
Line9	DL_5byte $6000+64
Line10	DL_5byte $6000+128
Line11	DL_5byte $6000+192


;************** Cart reset vector **************************

	 ORG	$fff8
	.byte	$FF		;Region verification
	.byte	$87		;ROM start $8000
	.word	NMI 
	.word	START
	.word	IRQ 
;************************************************************
;banks outside of 32KB rom 
;************************************************************
song = [*-$8000]/4096			;calculate start bank number
	ins 'music/CollisionChaos.hff'
	alignbank 4096				;music align to end 4096 bank 	
endsong = [*-$8000]/4096		;calculate end bank number
gfx = [*-$8000]/4096
	ins 'rayman2.raw'
endgfx = [*-$8000]/4096

 

SNhuffmunch.zip

  • Like 3
Link to comment
Share on other sites

This is really rocket science! I read through this a few times. For wizzy this would solve one of my biggest space problems. In later stages of the game I have a need of letting some graphical effects remain on the screen while other actions continue. Typical actions like casting an ice spell or a fire spell should continue even if wizzy transfoms to some other shape.

The dual RAM idea would allow me to keep the music running without taking up space of the special effects. I could keep the last free RAM block for text/special effects.

 

Thanks for sharing these ideas. I would never have discovered this by myself.

  • Like 1
Link to comment
Share on other sites

6 hours ago, karri said:

Thanks for sharing these ideas. I would never have discovered this by myself.

 

If you updated DragonFly recently then yo can use this extra 16KB as well.

It's is compatible with SN cart

Hotspot at $FFFF - bit 0 change between lower and upper 16KB

Avoid bit 1 and 2 on SN cart (this is for control A8/A9 line ram)

 

This extra ram in DF was used first time by Paul in 1942 game for extra Pokey music 

Also remember that banks $Axxx, $Cxxx, $Exxx can use only first 256KB

If you want reach above 256KB you can only use $Dxxx bank

Link to comment
Share on other sites

  • 1 month later...

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...