Jump to content

fox

Members
  • Content Count

    266
  • Joined

  • Last visited

Posts posted by fox


  1. 18 hours ago, nuadok said:

    How did you learn this? 

    I learned that in the 80s. There were these excellent books in Polish: "Asembler 6502" by Jan Ruszczyc and four parts of "Mapa pamięci Atari XL/XE".

     

    AMAC is not a friendly environment to study the 6502 asm. Try Quick Assembler (QA) instead. It's an IDE. For the start:

     opt 21
     org $600
    loop lda $d40b
     sta $d01a
     jmp loop
    
    

    In the "Setup" menu set the run address to 0600. Then select "Assembly" and "Run". Shift+Break to terminate your program.
     


  2. Apparently, the people here are not familiar with the AMAC syntax.

    1. Select a memory location for your program with ORG.
    2. Terminate your program somehow (e.g. RTS for return to DOS).
    3. Specify the run address as an argument to END.

     ORG $6000
    MAIN LDA 710
     STA 712
     LDY #1
     RTS
    
     END MAIN
    

    This program changes the border color to the background color and returns to DOS.
    LDY #1 is not essential. If missing, some DOSes will report an error when they get back control.
     

    • Like 2

  3. You can have Continuous integration for your xasm projects on GitHub.

     

    Here's how to setup it:

     

    1. Login to Travis CI and opt-in for your project(s).

     

    2. "git add" .travis.yml with the configuration and optionally add a badge to README.md.

    Here's an example: https://github.com/pfusik/datamatrix6502/commit/0e8737db5568baaf3a5cef411a032ac961ca5fd4
    The "script" line contains your build command.
    Commit&push and you're done!
     

    • Like 4

  4. Thanks!
    First I tried to upscale with VirtualDub, but it couldn't open the file ("Couldn't locate decompressor for format 'ZMBV' (unknown)") and I couldn't google the codec.
    Then I tried Altirra 3.90 test 20. With 960x720 upscaling it looks much better:
     

     

    • Like 1

  5. Something's wrong with the RAM option. I convert a ~40 second MP3 changing just the frequency to 15kHz.
    The!Cart plays fine, but RAM XEX is trimmed (just the beginning of the audio plays) and with high noises.
    I'm testing on Altirra 3.20 XE PAL 320K Rambo and both files are ~230KB.

    • Like 1

  6. Last week I made a minor release of xasm - a 6502 cross-assembler with original syntax extensions, running on Windows, macOS and Linux.
    Visit https://github.com/pfusik/xasm for downloads, docs and full source code. 

     

    Changes from 3.1.0:

    • remove partial object file on error (requested by Bill Kendrick)
    • report label name in the unused label warning (requested by Peter Dell)
    • support a:/f: modifiers for RUN/INI
    • improved performance with network drives (reported by Marek Pavlik)
       

    xasm-inflate2.png

    • Like 9

  7. Shift data may be a problem. The playfield shift register already runs at maximum speed in ANTIC 4 so doubling the fetch rate won't speed up the shifter; this means that it will only get a chance to shift out four bits before it is reloaded again. Tests I did years ago suggested that when this happens the new byte is merged into the shift register similarly to when players are reloaded. Since the playfield shifts out bits MSB first, this will cause bit 7 from the name to merge with the character data. I don't remember offhand if the effective result is an AND or an OR.

    Take a look at the 4-pixel wide right-pointing triangles:

    post-1625-0-67144100-1514059703.png

    Is inverse video applied on the shift register output or the load value?

    • Like 5

  8. I confirm that Altirra 2.99-test24 doesn't require the padding byte.
    What's the use of SYNC input? SIO INTERRUPT is a PIA IRQ?
    I think that MIDI devices have to sync on the start bit, otherwise they could be probing at the signal edges. And the clocks aren't probably perfect.
    Thanks for pointing out the problems with analog distortions and awaiting completion.

    More complicated example, those bytes: 0x90 0xfa 0x41 0x00 0x43 0xfc 0x00 are really four messages

    midiOutShortMsg(out, 0xfa);

    midiOutShortMsg(out, 0x4190);

    midiOutShortMsg(out, 0xfc);

    midiOutShortMsg(out, 0x43);

     

    Messages 0xfa and 0xfc are MIDI real-time messages they can be interspersed with any other message and they don't cancel running status.

    Doesn't 0x43 have the implicit command 0x90? If so, why is it reordered with 0xfc?


  9. Thank you! It works.

     

    I noticed that MIDI Sequencer by Maciej Sygit uses the $15 divisor. The difference seem small enough to transmit one byte if the MIDI device synchronizes on every start bit - does it? Is the 4MHz/128 clock internal to MIDIMATE? I don't know what's inside MIDIMATE, but I know that in the '90s people used a simple "wires-only" SIO-MIDI interface.

     

    The minimum set of changes was: motor on, a padding byte and waiting for transmission to complete:

    	org	$6000
    main
    	sei
    	mva	#$34	^32	; motor on
    	ldy	#7
    	lda	#0
    	sta:rpl	^20,y-
    	mva	#$28	^28
    	mva	#$15	^24
    	mva	#$23	^2f
    
    	mva	#0	^2e
    	mva	#$10	^2e
    	mvx	#$c0	^2d
    	ldx	#$01	; instrument
    	jsr	send
    	ldx	#$00	; padding needed for Altirra
    	jsr	send
    
    	ldx	#$90
    	jsr	send
    	ldx	#$3c	; middle C
    	jsr	send
    	ldx	#$7f
    	jsr	send
    
    	lda	#8
    	and:rne	^2e	; wait for transmission complete
    
    	mva	#3	^2f
    	mva	$10	^2e
    	cli
    	rts
    
    send
    	lda	#$10
    	and:rne	^2e
    	sta	^2e
    	mva	#$10	^2e
    	stx	^2d
    	rts
    
    	run	main
    	end
    
    
×
×
  • Create New...