Antichambre

MIDIbox TIA - Atari 2600 Synth

191 posts in this topic

Hi Bruno,

I flashed the new HEX, I think everything works better... except the led meter :)

I get the start up behaviour, but when I'm playing, I just get MIDI IN (upper led) reaction.

No other led-animation from the eight other leds.

Nicolas

Share this post


Link to post
Share on other sites

Posted (edited)

I built more than 10 boxes and I never got this issue.
Academic Planner has the same issue as you on 1 of his 3 built synth, he will send it to me as I can fix it.
This is just a question of time... ;)

Best regards
Bruno

Edited by Antichambre

Share this post


Link to post
Share on other sites

What a fine invader it is...   :love:

LRIMG_8442.thumb.jpg.da5c39af5b2acb846a1

LRIMG_8440.jpg

1 person likes this

Share this post


Link to post
Share on other sites

Hello,

I found the issue but I'm not able to explain it.

There's a flag to refresh the LED_METER in tia_sr.inc:
This flag is set on each TIA registers value change:

bsf     TIA_LEDMTR_STAT, TIA_LEDMTR_AUDX_REQ

in TIA_SR_Handler

;; --------------------------------------------------------------------------
;;  Check for changes in TIA registers, transfer values to TIA
;;  and handle Wavetable
;; --------------------------------------------------------------------------
TIA_SR_Handler
	btfsc	TIA_STAT, TIA_STAT_ENGINE_DISABLE
	return

	;call	TIA_WT_Handler			; call wavetable handler before continue
_TIA_SR_Handler
TIA_SR_Start

	TABLE_ADDR TIA_SR_REGWRITE_TABLE	; contains order of register accesses
	movlw	6		; number of registers (0x06)
	movwf	TMP1				; TMP1 is the loop counter
	lfsr	FSR0, TIA_BASE			; store base address of TIA registers in FSR0
	lfsr	FSR1, TIA_SHADOW_BASE		; store base address of shadow registers in FSR1

	IRQ_DISABLE				; disable interrupts

TIA_SR_Loop
	tblrd*+
	movf	TABLAT, W
	movff	PLUSW0, MIOS_PARAMETER2		; store value of TIA in MIOS_PARAMETER1 and increment FSR0
	BRA_IFSET TIA_STAT, TIA_STAT_FORCE_REFRESH, ACCESS, TIA_SR_Transfer; don't skip if refresh has been forced
	movf	PLUSW1, W			; get content of appr. shadow register
	cpfseq	MIOS_PARAMETER2, ACCESS; transfer to TIA if not equal
	rgoto TIA_SR_Transfer	
  	rgoto	TIA_SR_Next			; skip following code if equal

TIA_SR_Transfer
	;; register change: write value into shadow register and transfer it to TIA
	movf	TABLAT, W
	movff	MIOS_PARAMETER2, PLUSW1		; store value in shadow register

	movf	TABLAT, W			; extract address, add offset
    addlw   0x05
	movwf	MIOS_PARAMETER1			; store in address register

	rcall	TIA_SR_Write			; transfer to TIA
    bsf     TIA_LEDMTR_STAT, TIA_LEDMTR_AUDX_REQ
    
TIA_SR_Next
	decfsz	TMP1, F				; decrement loop counter until it is zero
	rgoto	TIA_SR_Loop

	IRQ_ENABLE				; enable interrupts again

	bcf	TIA_STAT, TIA_STAT_FORCE_REFRESH; clear refresh request (if it has been set before)

	return

When the LED_METER Handler is called
It first checks the flag and decides what to do

;; --------------------------------------------------------------------------
;;  LEDMTR module Handler
;; --------------------------------------------------------------------------
TIA_LEDMTR_Handler
	SET_BSR	TIA_BASE		; prepare BSR for TIA register access
    BRA_IFCLR TIA_LEDMTR_STAT, TIA_LEDMTR_AUDX_REQ, ACCESS, TIA_LEDMTR_Handler_End
    
TIA_LEDMTR_Handler_Meter_Norm     
    bcf     TIA_LEDMTR_STAT, TIA_LEDMTR_AUDX_REQ

    clrf    TIA_LEDMTR_VALUE
    movlw   0x01
    cpfslt  TIA_AUDV0
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR0
    movlw   0x07
    cpfslt  TIA_AUDV0
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR1
    movlw   0x0b
    cpfslt  TIA_AUDV0
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR2
    movlw   0x0e
    cpfslt  TIA_AUDV0
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR3
    
    movlw   0x01
    cpfslt  TIA_AUDV1
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR4
    movlw   0x07
    cpfslt  TIA_AUDV1
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR5
    movlw   0x0b
    cpfslt  TIA_AUDV1
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR6
    movlw   0x0e
    cpfslt  TIA_AUDV1
    bsf     TIA_LEDMTR_VALUE, TIA_LEDMTR7 

    movf    TIA_LEDMTR_VALUE, W
    movwf   MIOS_PARAMETER1
    rgoto   TIA_LEDMTR_Handler_Set

TIA_LEDMTR_Handler_Set
    movlw   TIA_LEDMTR_REG
    rcall    TIA_LEDMTR_Write

TIA_LEDMTR_Handler_End
	return

It seems to be something like a RAM issue. cause when I change the TIA_LEDMTR_STAT register address in app_defines.h it solves the problem.
This is what I changed:

;; ==========================================================================
;; free: 0x027-0x066

;; ==========================================================================

MIDI_RXTX_RX_CTR	EQU	0x067
MIDI_RXTX_TX_CTR	EQU	0x068
MIDI_RXTX_BEAT_CTR	EQU	0x069

;; ==========================================================================

TIA_LEDMTR_STAT     EQU	0x06a
TIA_LEDMTR_VALUE	EQU	0x06b

to

;; ==========================================================================
;; free: 0x027-0x04f

;; ==========================================================================
TIA_LEDMTR_STAT     EQU	0x050
TIA_LEDMTR_VALUE	EQU	0x051

;; ==========================================================================
;; free: 0x052-0x066

;; ==========================================================================
MIDI_RXTX_RX_CTR	EQU	0x067
MIDI_RXTX_TX_CTR	EQU	0x068
MIDI_RXTX_BEAT_CTR	EQU	0x069

;; ==========================================================================
;; free: 0x06a-0x06b

I've checked for address conflict, there's no :(

If anyone can explain me it, he is welcome !!!

Best regards
Bruno

PS: I will share a new firmware version asap...

Share this post


Link to post
Share on other sites

Hey Bruno, would you have some spare fasteners to fasten my SUB-D25 to the aluminium backplane? Thanks!

Share this post


Link to post
Share on other sites
13 minutes ago, wired said:

Hey Bruno, would you have some spare fasteners to fasten my SUB-D25 to the aluminium backplane? Thanks!

Yes I saw that it's already done!
There was no sound because jumper for audio was not in the right position.
I remove the drilling helper from inside your box, this part is just to help you for drilling Leds holes and must be removed after hihi :)
Your box shines now ;)


Fichier%2012-07-2018%2010%2049%2029.jpg?

Best regards
Bruno

Share this post


Link to post
Share on other sites

Thanks. Strange because I had sound... :confused: But thanks!

Share this post


Link to post
Share on other sites
Just now, wired said:

Thanks. Strange because I had sound... :confused: But thanks!

You maybe change it after testing ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now