Jump to content
IGNORED

Source Code Released! Scrolling MCS, PMU & RMT


analmux

Recommended Posts

SOURCE CODE RELEASED !!!

 

10 Years ago I wrote an interactive demo. It works on a stock XL/XE ATARI. It uses:

 

- Scrolling MCS

- Scrolling Antic 4

- Scrolling PMU, using no PMBASE but direct GRAFP0 - GRAFP3

- Quad width PMU sprites to add some extra colours; the PMUs can increase the number of graphics colours up to 6

- A series of DLIs

 

Last week I researched the source code, and now I remember what I did all then. I realize that the source code uses a general multi purpose structure, so another user can implement different antic 4 fonts and colours. The antic 4 field and the scrolling PMU field can be replaced by a totally different map.

 

I rewrote a small update today, and here I release the source code. Now it's quite easy to change the data maps. It is restricted to 5 blocks of 4 kB, LMS commands at every antic 4 line, with respect to ANTIC; 352 character columns (i.e. x-direction) and 54 character rows (i.e. y-direction).

 

----------------------------------------

More explanation of the source code includes:

 

'mappmucg.asx': The scrolling PMU world has 2 index maps of 256 bytes each. The colour map uses bit 0 and 1 to select which 'Player' number to programm. The other bits from 2 to 7 select a palette colour value (see 'main.asx'). The GRAFP data is listed in the 2nd index map.

 

'mapxpmu.asx': This is the map of index numbers related to the y-x-positions of the PMUs.

 

'mapyantic4.asx': This is the antic 4 map, and it uses canonical x-y-positions.

 

----------------------------------------

More explanation of the file maps (see the zip file):

 

'Basis SMB3 Instrumentarium': It uses 100 Hz commands, using RMT 125 Patch 3

'Basis SMB3 Moon Patrol': It uses 50 Hz commands, using RMT 125

'Basis SMB3 Silence': No RMT commands at all

 

----------------------------------------

MCS = 'Multiple Coloured Screen'

PMU = 'Player Missile Underlay'

DLI = 'Display List Interrupt'

RMT = 'RaSter Music Tracker'

----------------------------------------

 

 

AtariAge Forums - Atari Systems - Atari 8-Bit Computers - Scrolling MCS, PMU & Instrumentarium tune

AtariAge Forums - Atari Systems - Atari 8-Bit Computers - Instrumentarium: Final release, links & summary

201409142100.zip

Edited by analmux
  • Like 8
Link to comment
Share on other sites

  • 6 months later...

I'm thinking about a slight modification to get rid of the 'asl @' / 'lsr @' commands in one of the 'colorupdate' subroutines in 'main.asx':

 

val 0 -> bit 7

bit 1 -> bit 6

bit 0 -> bit 5

bit 6 -> bit 4

bit 5 -> bit 3

bit 4 -> bit 2

bit 3 -> bit 1

bit 2 -> bit 0

 

 

Old version:

 

colorupdate
	lda	z_cuf
	bne	cup_0
	rts
cup_0	cmp	#1
	bne	cup_1
	mva	#16		z_tmp0
	mva	#RIGHTX		z_px
	jmp	cup_2
cup_1	cmp	#2
	bne	cup_2
	mva	#253		z_tmp0
	mva	#LEFTX		z_px
cup_2	lda	z_colx
	add	z_tmp0
	tax
	lda	Bartabl,x
	sta	z_sour
	lda	Bartabh,x
	sta	z_sour+1
	ldy	#0
cup_4	lda	(z_sour),y
	beq	cup_3
	tax
	lda	names0,x
	sta	z_tmp0
	lda	names0+256,x
	sta	z_tmp1
	lda	z_tmp0
	and	#3
	asl	@
	asl	@
	asl	@
	asl	@
	asl	@
	sta	z_dest
	mva	#$87	z_dest+1
	lda	z_px	
	sta	(z_dest),y
	lda	z_dest
	ora	#128
	sta	z_dest
	lda	z_tmp0
	and	#252
	lsr	@
	lsr	@
	tax
	lda	palette,x
	sta	(z_dest),y
	inc	z_dest+1
	lda	z_tmp1
	sta	(z_dest),y
cup_3	iny
	cpy	#27
	bne	cup_4
	jmp	pmcheck

New version:

 

colorupdate
	lda	z_cuf
	bne	cup_0
	rts
cup_0	cmp	#1
	bne	cup_1
	mva	#16		z_tmp0
	mva	#RIGHTX		z_px
	jmp	cup_2
cup_1	cmp	#2
	bne	cup_2
	mva	#253		z_tmp0
	mva	#LEFTX		z_px
cup_2	lda	z_colx
	add	z_tmp0
	tax
	lda	Bartabl,x
	sta	z_sour
	lda	Bartabh,x
	sta	z_sour+1
	ldy	#0
cup_4	lda	(z_sour),y
	beq	cup_3
	tax
	lda	names0,x
	sta	z_tmp0
	lda	names0+256,x
	sta	z_tmp1
	lda	z_tmp0
	and	#96
	sta	z_dest
	mva	#$87	z_dest+1
	lda	z_px	
	sta	(z_dest),y
	lda	z_dest
	ora	#128
	sta	z_dest
	lda	z_tmp0
	and	#31
	tax
	lda	palette,x
	sta	(z_dest),y
	inc	z_dest+1
	lda	z_tmp1
	sta	(z_dest),y
cup_3	iny
	cpy	#27
	bne	cup_4
	jmp	pmcheck
Link to comment
Share on other sites

Then we need to modify the 'mappmuc' table in 'mappmucg.asx' also:

 

 

Old version:

 

mappmuc
	dta $00,$04,$05,$06,$07,$04,$04,$05,$06,$07,$04,$05,$06,$07,$04,$05
	dta $06,$07,$04,$05,$06,$07,$04,$04,$05,$06,$07,$04,$05,$06,$07,$04
	dta $05,$06,$04,$05,$04,$05,$06,$0B,$04,$05,$06,$04,$05,$0B,$04,$05
	dta $06,$07,$04,$0B,$0B,$04,$05,$06,$07,$0B,$04,$0B,$0B,$0B,$0B,$05
	dta $0B,$04,$05,$07,$04,$05,$06,$0A,$0B,$04,$07,$04,$05,$06,$0A,$0B
	dta $04,$09,$06,$07,$04,$0A,$04,$09,$06,$07,$04,$0C,$0D,$0A,$09,$07
	dta $04,$0F,$06,$0A,$0C,$0D,$0A,$09,$07,$04,$08,$0E,$06,$0A,$0B,$08
	dta $0D,$0A,$09,$0A,$07,$04,$08,$09,$0F,$08,$09,$06,$0A,$0B,$08,$0D
	dta $08,$09,$0A,$09,$0A,$07,$04,$08,$09,$0F,$08,$09,$0A,$0B,$08,$09
	dta $0A,$0B,$08,$09,$0B,$08,$0D,$0B,$08,$09,$0A,$0B,$08,$09,$0A,$07
	dta $04,$08,$09,$0A,$0F,$08,$09,$0A,$0B,$0A,$0B,$08,$0D,$0A,$0B,$08
	dta $09,$0A,$0B,$08,$09,$0A,$07,$04,$05,$0F,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

New version:

 

mappmuc
	dta $00,$01,$21,$41,$61,$01,$01,$21,$41,$61,$01,$21,$41,$61,$01,$21
	dta $41,$61,$01,$21,$41,$61,$01,$01,$21,$41,$61,$01,$21,$41,$61,$01
	dta $21,$41,$01,$21,$01,$21,$41,$62,$01,$21,$41,$01,$21,$62,$01,$21
	dta $41,$61,$01,$62,$62,$01,$21,$41,$61,$62,$01,$62,$62,$62,$62,$21
	dta $62,$01,$21,$61,$01,$21,$41,$42,$62,$01,$61,$01,$21,$41,$42,$62
	dta $01,$22,$41,$61,$01,$42,$01,$22,$41,$61,$01,$03,$23,$42,$22,$61
	dta $01,$63,$41,$42,$03,$23,$42,$22,$61,$01,$02,$43,$41,$42,$62,$02
	dta $23,$42,$22,$42,$61,$01,$02,$22,$63,$02,$22,$41,$42,$62,$02,$23
	dta $02,$22,$42,$22,$42,$61,$01,$02,$22,$63,$02,$22,$42,$62,$02,$22
	dta $42,$62,$02,$22,$62,$02,$23,$62,$02,$22,$42,$62,$02,$22,$42,$61
	dta $01,$02,$22,$42,$63,$02,$22,$42,$62,$42,$62,$02,$23,$42,$62,$02
	dta $22,$42,$62,$02,$22,$42,$61,$01,$21,$63,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
	dta $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
Link to comment
Share on other sites

And here's the download, with a new song included:

 

'Basis SMB3 Instrumentarium': It uses 100 Hz commands, using RMT 125 Patch 3

'Basis SMB3 King Crimson Level Five': It uses 100 Hz commands, using RMT 128 Patch 8

'Basis SMB3 Moon Patrol': It uses 50 Hz commands, using RMT 125

'Basis SMB3 Silence': No RMT commands at all

201503221259.zip

Edited by analmux
  • Like 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...