Jump to content
IGNORED

Nice and simple 65816 upgrade for original 800?


Kyle22

Recommended Posts

I did this, and it works fine with everything I tried, except of course software written using illegal opcodes, same as the 65802.

 

The unusual part is that while it works, I discovered one side effect.

 

Incognito almost if not always forgets its settings, but the clock is always correct.

 

I have replaced the Lithium cell, and no change.

 

It's no biggie because I put the 65802 back in.

 

I just wanted everyone to know.

Link to comment
Share on other sites

...

John Harris made some instructional posts a few years back when the company he was associated with did a 65C816 system. I think the memory move he posted was only 21 bytes vs. the ~40ish for a standard 6502. I know just using the 65C02 instruction set allows you to write ~5% tighter code. Overall the lower current, reduced code size and resultant faster execution just for adding a jumper and $10 processor seems like a real win. I think B&C has/had some of the old style boards for people that want to revert their 800 back to 6502B/65C816 for ~$15.

...

This is the macro I used for my 64/80 column graphics text screen scroll. It's slower than an unrolled loop copying 16 bits at a time..

This is for the CA65 assembler.

 

;*********************************************
;* 65816 support
;*********************************************
.if Use65816 = 1
.P816
;Memory Move Negative.  Move from hi to lo address.
;Memory is moved at the rate of seven clock cycles per byte.
; MVN increments the X and Y registers, and decrements A
; The non-maskable interrupt (NMIEN) must be disabled on the Atari unless
; you have your own interrupt handler to deal with 65816 code
;*********************************************
.macro	MOVEMEMN	SourceAddress,DestAddress,BytesToMove,SourceBank,DestBank
	SEI
	clc
	xce					; native mode
	rep	#$31				; set A, X, and Y to 16 bit, clear carry
.A16						; Tell assembler Accumulator is 16 bit
.I16						; Tell assembler Index registers are 16 bit
	LDX	#SourceAddress			; The source address for the memory move
	LDY	#DestAddress			; The destination address for the memory move
	LDA	#BytesToMove-1			; The number of bytes we want to move + 1 because MVN needs it
	MVN	SourceBank,DestBank		; RAM banks, should be 00,00 on 64K system
;	sep	#$31				; set A, X, and Y to 8 bits, set carry
	xce					; emulated mode
.A8						; Tell assembler Accumulator is 8 bit
.I8						; Tell assembler Index registers are 8 bit
	CLI
.endmacro
.endif

I also had to disable the Atari non-maskable interrupt before entering 16 bit mode.

 

	LDA	#0				; turn off ATARI non maskable display interrupts for 65816
	STA	NMIEN

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