The 8mbit flash cart format is 128 banks of 8k. The memory window is A000-BFFF.
You turn on the cartridge and switch banks by touching D5-00 -> D5-7F and turn off the cartridge by touching D5-80.
When the Atari is started, the last bank of the cartridge (bank 7F) is active in memory.
Other than that, you can treat it like any other bank switched cartridge.


Make ATR programming file for cart from emulator cart bin file
In command prompt:

cd c:\maxflash
perl c:\maxflash\maxflash.pl -bin2atr c:\sh\sh.bin


 
Here is the code I used to save game states for Summer Games.  The stuff
at the end is game specific and probably no useful, but the other routines are
general purpose calls for erasing a bank and writing from a block of memory
into the erased area.

--
;;
;; XL/XE Equates
;;
inter			.equ	$3FA	;; Shadow of cartridge interlock
cartop			.equ	$BFFF	;; Last byte of cartridge
trig3			.equ	$D013	;; Wired to cartridge on XL/XE
random			.equ	$D20A	;;
zerobank		.equ	$D500	;; Zero bank
 
;;
;; Flash program registers
;;
copysrc			.equ	$30	;; Source pointer
copydst			.equ	$32	;; Destination pointer
cursec			.equ	$34	;; Current sector base
curbank			.equ	$35	;; Current absolute cart bank
count			.equ	$36	;; 16-bit count of data to read/write
pollsame		.equ	$39	;; Write polling scratch register
 
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Set bank to the base of a 64k 'sector' in flash cartridge
	;;
	;; Valid sectors are 8-15 for an 8mbit cartridge, passed in A
	;;
 
setsec	sta cursec
	and #$0F
	clc
	rol A
	rol A
	rol A
	tax
	sta zerobank,x
	sta curbank
	rts
			
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Erase a 64k sector of an 8mbit flash cartridge
	;;
	;; Valid sectors are 8-15, passed in A
	;;
	
erasebk pha
_ebc1	jsr cmd_unlock
	lda #$80
	jsr wr5555
	jsr cmd_unlock
	pla
	jsr setsec
	lda #$30
	sta carbase
	jsr poll_write			
	rts
	.export erasebk
	
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Increment the source pointer, dec the 16-bit byte counter, carry will be clear if it turns over
	;;
	
decctr	inc copysrc		;; Increment the source pointer
	bne _dcdst
	inc copysrc+1
_dcdst	inc copydst
	bne _dccmp
	inc copydst+1
_dccmp	lda copydst+1
	cmp #hi(cartop+1)
	bne _decby
	inc curbank
	lda #hi(carbase)
	sta copydst+1
_decby	sec
	lda count
	sbc #$01
	sta count
	lda count+1
	sbc #$00
	sta count+1
	rts
		
         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
         ;;
         ;; Program upto 64k into a sector of the flash cartridge.
         ;;
         ;; copysrc should be set to the start of data to program.
         ;; count should be set to the total number of bytes to write (0 based)
         ;; sector to write to should be passed in A
	;;
         ;; you should call erasebk with the sector to erase before programming
         ;;
 
prgsec	jsr setsec
 
_prgnw	lda #lo(carbase)
	sta copydst
	lda #hi(carbase)
	sta copydst+1
 
_prg1	jsr cmd_unlock		
	lda #$A0		
	jsr wr5555		
	ldx curbank		
	sta zerobank,x		
	ldy #$00		
	lda (copysrc),y		
	sta (copydst),y		
	jsr decctr		
	bcs _prg1
 
_prgerr	rts			
	.export prgsec
 
         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
         ;;
         ;; Program Initalization and Cleanup
         ;;
 
init	lda #$00			
	sta nmien			
	sta wsync			
	rts
	
         ;;
         ;; Cleanup routines
         ;;
 
cleanup sta cartoff
	sta wsync			
	lda trig3			
	sta inter			
	lda #$40			
	sta nmien			
         rts
 
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Poll for flash write operation to complete
	;;
	
poll_write	lda #$00		
		sta pollsame		
_poll_again	lda carbase	
		cmp carbase 		
		bne poll_write		
		cmp carbase 		
		bne poll_write		
		cmp carbase 		
		bne poll_write		
		inc pollsame		
		bne _poll_again			
		rts		
 
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Send unlock sequence
	;;
	
cmd_unlock	lda #$AA			
		jsr wr5555			
		lda #$55
		jmp wr2AAA
 
	
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Shortcut to write a few commonly used 17-bit addresses
	;;
	
wr5555	sta $d542	
	sta $b555
	rts		
wr2AAA	sta $d541		
	sta $aaaa		
	rts
	
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Write @ sector 2ce from $6320, 2 sector
	;;
wr2ce	jsr init					;; c4a -> cea9 -> pos 4da
	lda #$08					;; flash sector 8
	jsr erasebk					;; 02 sectors from 6320 to sector 2CE/2CF
 
	lda #$20
	sta copysrc
	lda #$63
	sta copysrc+1
 
	lda #$FF
	sta count
	lda #$00
	sta count+1
 
	lda #$08
	jsr prgsec	
	jsr cleanup
	rts
	.export wr2ce
	
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Shared memory copy routine.  Pass table offset in X
	;;
memcpy	lda #$00
	sta copysrc
	lda #$A0
	sta copysrc+1
	lda readtab,x
	sta copydst
	inx
	lda readtab,x
	sta copydst+1
	inx
	lda readtab,x
	sta count
	inx
	lda readtab,x
	sta count+1
	inx
	lda readtab,x
	tax
	sta zerobank,x
_cpsec	ldy #$00
	lda (copysrc),y
	sta (copydst),y
	jsr decctr		
	bcs _cpsec
	rts
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;		
;; Flash reads
;;
;;		dest pointer	count (zero based)	bank		flash sector	disk sector
readtab	.byte	$20, $63,	$FF, $00,		$40	;;	8		2CE/2CF
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Read entry points
;;
 
rd2ce	ldx #$00			;; c09 -> cf02 -> pos 499
	jsr init
	jsr memcpy
	jsr cleanup
	rts
	.export rd2ce
	
	.end
