Ok. Perfect! You went even one (or several) step ahead of what I was sayingTwilighte wrote:Hi Chema, damn i modified the message above whilst you were replying to it. So reread please.
Perfect too. You have 6655 bytes from $e600, unless any change in the world map creates the need of another 256k page (which I hope is not the case).As for the "Pool" tunes, i think we should seriously consider placing both effects and music in the same memory area and available during the game. It would still use just 5k but would make available all patterns for "pool" and "Hifi" tunes and Title tune.
Testing it shouldn't be a problem for me, and i am resigned in the idea the whole 5K will eventually reside somewhere above C000.
The highest address used in Zero page is $40, so you have over 190 bytes left. You can optimize whatever you want to use all it up. Else I will have a look and see what bits can be put there to gain some cycles...Sonix used 00-0B of page Zero but once i decompile the code i will make it dynamic. Nevertheless it will still require around 12 bytes of zero page.
Sure:Can you send me the original code i gave for the IRQ routine. Then i can implement the music and sfx into it.
Code: Select all
; key read and timer irq #define via_portb $0300 #define via_t1cl $0304 #define via_t1ch $0305 #define via_t1ll $0306 #define via_t1lh $0307 #define via_t2ll $0308 #define via_t2ch $0309 #define via_sr $030A #define via_acr $030b #define via_pcr $030c #define via_ifr $030D #define via_ier $030E #define via_porta $030f .zero TimerCounter .byt 40 ;Slows key read to 25Hz KeyCode .dsb 1 ;The keycode .text _init_irq_routine ;Since we are starting from when the standard irq has already been ;setup, we need not worry about ensuring one irq event and/or right ;timer period, only redirecting irq vector to our own irq handler. sei lda #<irq_routine ;sta $0245 ;When we disable rom, we should change this to $fffe sta $fffe lda #>irq_routine ;sta $0246 ;When we disable rom, we should change this to $ffff sta $ffff cli rts ;The IRQ routine will run (Like Oric) at 100Hz. irq_routine ;Preserve registers sta a_reserve+1 ;Preserving registers like this saves us 11 cycles - stx x_reserve+1 ;over using the traditional pha, txa, pha, etc. sty y_reserve+1 ;Even using absolute self mod code like this!! ;Protect against Decimal mode cld ;Clear IRQ event lda via_t1cl ;Process Sound Effects ; jsr proc_sfx ;Process Music ; jsr proc_music ;Process timer event dec TimerCounter .( lda TimerCounter and #4 ;Essentially, every 4th irq, call key read bne skip1 ;Process keyboard jsr proc_keyboard skip1 ;Process controller (Joysticks) .) ; jsr proc_controller ;Send Sound Bank ; jsr send_ay ;Restore Registers a_reserve lda #00 x_reserve ldx #00 y_reserve ldy #00 ;End of IRQ rti
[/quote]I now have alot of work to do to get this sound sorted.
btw, i always use DosBox now, just so much better than VPC.
I also have DosBox, but I can't remember what the problem was... It is a bit slower but can't remember why I switched to VirutalPC... maybe only testing
Anyway I launch Euphoric directly from XP 99% of the time. Just when it starts hanging or ignoring the keyboard (space and other keys start minimizing Euphoric) or when I want to hear music I use other options.