Jump to content
IGNORED

Cartridge that takes a 28 PIN ROM


Recommended Posts

Well, I'm making some progress with ca65/ld65. So far I have this code:

 

; *****************************
; CIO equates
; *****************************
ICHID  =   $0340
ICDNO  =   $0341
ICCOM  =   $0342
ICSTA  =   $0343
ICBAL  =   $0344
ICBAH  =   $0345
ICPTL  =   $0346
ICPTH  =   $0347
ICBLL  =   $0348
ICBLH  =   $0349
ICAXl  =   $034A
ICAX2  =   $034B
CIOV   =   $E456

.segment "CODE"

; *****************************
; Now we load in required data
; *****************************
	LDX #0        ; Since it's IOCB0
	LDA #9        ; For put record
	STA ICCOM,X   ; Command byte
	LDA #<MSG	  ; Low byte of MSG
	STA ICBAL,X   ;  into ICBAL
	LDA #>MSG	  ; High byte of MSG
	STA ICBAH,X   ;  into ICBAH
	LDA #0        ; Length of MSG
	STA ICBLH,X   ;  high byte
	LDA #$FF      ; Length of MSG
	STA ICBLL,X   ; See discussion
; *****************************
; Now put it to the screen
; *****************************
	JSR CIOV
B:	JMP B
	RTS
; *****************************
; The message itself
; *****************************
MSG:    .asciiz "A SUCCESSFUL WRITE!"
	.byte $9B

And created this 'atari.cfg' file:

# Linker config file for targeting the Atari 2600.

MEMORY {
       RAM:   start = $80,   size=$80, type = rw, define = yes;
       ROM:   start = $E000, size=$2000, type = ro, file = %O, define = yes;
       TIA:   start = $00,   size=$40, type = rw, define = yes;
       RIOT:  start = $280,  size=$20, type = rw, define = yes;
}

SEGMENTS {
       RODATA:   load=ROM, type=ro, align = $100;
       CODE:     load=ROM, type=ro, define=yes;
       DATA:     load=ROM, run=RAM, type=rw, define=yes;
       BSS:      load=RAM, type=bss, define=yes;
       ZEROPAGE: load=RAM, type=zp;
       TIA:      load=TIA, type=rw, define = yes, optional = yes;
       RIOT:     load=RIOT, type=rw, define = yes, optional = yes;
}

I snarfed these online as I was trying to figure out the assembler/linker. I can assemble the above code but putting in the emulator and turning on the 130XE just shows a black screen.

 

I presume my cartridge code must do something else, right? Initialize the screen somehow?

 

Link to comment
Share on other sites

  • 2 weeks later...
On 5/9/2020 at 9:30 PM, David_P said:

Default carts with no bank switching are a maximum of 16K, occupying memory from $8000-BFFF.  You can order 16K boards (27128 EEPROM compatible) from OSH Park - https://oshpark.com/shared_projects/YreZRvio

 

 

Pardon the aside, but I just looked at that OSH Park link. Is that PCB really almost $30 each?!? 

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
On 5/27/2020 at 9:54 PM, boisy said:

I presume my cartridge code must do something else, right? Initialize the screen somehow?

 

You might need to do something like this, it opens a text screen

this was done in MAC/65

 

0100     .INCLUDE #D:HEADER.M65 ; SYSTEM EQUATES
0110     *=  $0600
0120 CHANNEL1 LDA #CLOSE
0130     LDX #$10
0140     STA ICCOM,X
0150     JSR CIOV
0160     LDA #0      ; RESERVE MEMORY
0170     STA APPMHI  ; FOR NEW SCREEN
0180     LDA #$80    ; ELSE OPEN WILL
0190     STA APPMHI+1 ; FAIL
0200     LDA #OPEN
0210     STA ICCOM,X
0220     LDA #NAME1&255
0230     STA ICBAL,X
0240     LDA #NAME1/256
0250     STA ICBAH,X
0260     LDA #3
0270     STA ICBLL,X
0280     LDA #0
0290     STA ICBLH,X
0300     LDA #$0C    ;R/W
0310     STA ICAX1,X
0320     LDA #0      ; TEXT SCREEN
0330     STA ICAX2,X
0360     JSR CIOV
0370 ZZ  JMP ZZ   ; YOUR CODE GOES HERE
0380 NAME1 .BYTE "S:",$9B
0390     .OPT NO LIST
 

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