diff --git a/res/dsk/bejeweled PRODOS (san inc pack).po b/res/dsk/bejeweled PRODOS (san inc pack).po new file mode 100644 index 000000000..8c5c91217 Binary files /dev/null and b/res/dsk/bejeweled PRODOS (san inc pack).po differ diff --git a/res/games.conf b/res/games.conf index 878aadda8..99ceee9a3 100755 --- a/res/games.conf +++ b/res/games.conf @@ -1 +1 @@ -000,AGENT.USA=Agent U S A 110,AIRHEART=Airheart 001,ALCAZAR=Alcazar 101,ALIEN.AMBUSH=Alien Ambush 001,ALIEN.DOWNPOUR=Alien Downpour 001,ALIEN.MUNCHIES=Alien Munchies 001,ALIEN.TYPHOON=Alien Typhoon 000,ANKH=Ankh 001,CIDER.SPIDER=Apple Cider Spider 001,APPLE.PANIC=Apple Panic 001,AQUATRON=Aquatron 000,ARGOS=Argos 101,ARKANOID=Arkanoid 001,ASTEROID.BLASTR=Asteroid Blaster 101,AXIS.ASSASSIN=Axis Assassin 000,AZTEC=Aztec 111,BAD.DUDES=Bad Dudes 100,BALLBLAZER=Ballblazer 110,BATMAN=Batman 001,BATTLEZONE=Battlezone 101,BCS.QUEST=BC's Quest For Tires 001,BEER.RUN=Beer Run 000,BELLHOP=Bellhop 001,BERZAP=Berzap 000,BEYOND.WOLFEN=Beyond Castle Wolfenstein 000,BUDGETRILOGY=Bill Budge's Trilogy 100,BLACK.MAGIC=Black Magic 000,BLISTER.BALL=Blister Ball 000,BLOCKCHAIN=BlockChain 001,BOLO=Bolo 001,BOUNCING.KMNGAS=Bouncing Kamungas 001,BRAINTEASERBLVD=Brainteaser Boulevard 101,BRUCE.LEE=Bruce Lee 101,BUBBLE.BOBBLE=Bubble Bobble 001,BUCK.ROGERS=Buck Rogers: Planet of Zoom 002,BURGERTIME=BurgerTime 001,BUZZARD.BAIT=Buzzard Bait 001,CANNONBALL.BLTZ=Cannonball Blitz 001,CANYON.CLIMBER=Canyon Climber 000,CAPTN.GOODNIGHT=Captain Goodnight 000,WOLFEN84=Castle Wolfenstein 101,CEILING.ZERO=Ceiling Zero 001,CENTIPEDE=Centipede 001,CHAMP.LODERUN=Championship Lode Runner 100,CHOPLIFTER=Choplifter 011,COMMANDO=Commando 002,CONAN=Conan 001,CRAZY.MAZEY=Crazy Mazey 001,CRIME.WAVE=Crime Wave 101,CRISIS.MOUNTAIN=Crisis Mountain 001,CROSSFIRE=Crossfire 001,CUBIT=Cubit 000,CYBERSTRIKE=Cyber Strike 001,CYCLOD=Cyclod 100,DAVIDS.MAGIC=David's Midnight Magic 010,DEATH.SWORD=Death Sword 101,DEFENDER=Defender 010,D.GENERATION=D-Generation 001,DIAMOND.MINE=Diamond Mine 001,DIG.DUG=Dig Dug 101,DINO.EGGS=Dino Eggs 101,DONKEY.KONG=Donkey Kong 101,DRELBS=Drelbs 001,DROL=Drol 000,DUNG.BEETLES=Dung Beetles 001,EGGS.IT=Eggs-It 000,EPOCH=Epoch 001,FALCONS=Falcons 001,FIREBIRD=Firebird 000,FS2=Flight Simulator II 000,FLIP.OUT=Flip Out 111,FORCE.7=Force 7 100,FORMULA.1=Formula 1 Racer 001,FREE.FALL=Free Fall 001,FROGGER=Frogger 101,FROGGER.II=Frogger II 001,GALAXY.GATES=Galaxy Gates 101,GAMMA.GOBLINS=Gamma Goblins 001,GENETIC.DRIFT=Genetic Drift 001,GOLD.RUSH=Gold Rush 001,GORGON=Gorgon 001,GREMLINS=Gremlins 001,GUARDIAN=Guardian 000,GUMBALL=Gumball 000,HADRON=Hadron 001,HARD.HAT.MACK=Hard Hat Mack 000,HEAD.ON=Head On 110,HEAVY.BARREL=Heavy Barrel 102,HERO=H E R O 000,HIGH.RISE=High Rise 000,HORIZON.V=Horizon V 001,HUNGRYBOY=Hungry Boy 000,HYPER.HEAD.ON=Hyper Head On 010,IKARI.WARRIORS=Ikari Warriors 100,IMPOSSIBLE.MISS=Impossible Mission 010,INDIANA.JONES=Indiana Jones 100,INTL.GRAN.PRIX=International Gran Prix 001,JOUST=Joust 000,JUGGLER=Juggler 001,JUMPMAN=Jumpman 000,JUNGLE.HUNT=Jungle Hunt 100,KAMIKAZE=Kamikaze 000,KARATEKA=Karateka 001,KID.NIKI=Kid Niki 000,LABYRINTH=Labyrinth 001,LADY.TUT=Lady Tut 001,LANCASTER=Lancaster 100,LASER.BOUNCE=Laser Bounce 001,LAZER.SILK=Lazer Silk 001,LODE.RUNNER=Lode Runner 100,LOST.TOMB=Lost Tomb 100,MAD.BOMBER=Mad Bomber 110,MARBLE.MADNESS=Marble Madness 001,MARIO.BROS=Mario Bros. 100,MINER.2049ER=Miner 2049er 101,MINGS.CHALLENGE=Ming's Challenge 001,MONTEZUMA=Montezuma's Revenge 001,MOON.PATROL=Moon Patrol 000,MR.COOL=Mr. Cool 101,MR.DO=Mr. Do! 101,MR.ROBOT=Mr. Robot 001,MS.PACMAN=Ms. Pacman 000,NIBBLER=Nibbler 100,NIGHT.MISSION=Night Mission Pinball 000,NIGHT.STALKER=Night Stalker 000,NIGHTMARE=Nightmare Gallery 000,NORAD=N O R A D 000,ORBITRON=Orbitron 000,ORILEYS.MINE=O'Riley's Mine 000,OOTW=Out of This World 000,OUTPOST=Outpost 000,PAC.MAN=Pac-Man 010,PAPERBOY=Paperboy 001,PEST.PATROL=Pest Patrol 100,PHANTOMS.FIVE=Phantoms Five 000,PHASER.FIRE=Phaser Fire 000,PHOTAR=Photar 000,PICNIC.PARANOIA=Picnic Paranoia 000,PIEMAN=Pie-Man 010,PIPEDREAM=Pipe Dream 100,PITFALL.II=Pitfall II 000,PITSTOP.II=Pitstop II 000,PLASMANIA=Plasmania 110,PLATOON=Platoon 000,POLLYWOG=Pollywog 001,POOYAN=Pooyan 010,PRINCEUNP=Prince of Persia 110,QIX=Qix 100,QUADRANT.6112=Quadrant 6112 010,RADWARRIOR=Radwarrior 010,RAMPAGE=Rampage 000,RASTER.BLASTER=Raster Blaster 100,RED.ALERT=Red Alert 110,RENEGADE=Renegade 000,REPTON=Repton 000,RESCUE.RAIDERS=Rescue Raiders 000,RIBBIT=Ribbit 000,ROADBLOCK=Roadblock 010,ROBOCOP=Robocop 000,ROBOTRON=Robotron 2084 000,RUSSKI.DUCK=Russki Duck 000,SABOTAGE=Sabotage 001,SAMMY.LIGHTFOOT=Sammy Lightfoot 000,SEA.DRAGON=Sea Dragon 000,SEAFOX=Seafox 001,SERPENTINE=Serpentine 100,SHAMUS=Shamus 000,SHORT.CIRCUIT=Short Circuit 000,SHUFFLEBOARD=Shuffleboard 000,SITUATION.CRTCL=Situation Critical 100,SKYFOX=Skyfox 000,SNACK.ATTACK=Snack Attack 000,SNAKE.BYTE=Snake Byte 001,SNEAKERS=Sneakers 000,SNOGGLE=Snoggle 100,SPACE.EGGS=Space Eggs 000,SPACE.QUARKS=Space Quarks 000,SPACE.RAIDERS=Space Raiders 000,SPARE.CHANGE=Spare Change 000,SPDWAY.CLASSIC=Speedway Classic 010,SPIDERBOT=Spiderbot 000,SPIDER.RAID=Spider Raid 000,SPY.HUNTER=Spy Hunter 001,SPYS.DEMISE=Spy's Demise 100,STARBLASTER=Starblaster 000,STAR.BLAZER=Star Blazer 100,STARGATE=Stargate 000,STAR.THIEF=Star Thief 000,STELLAR.7=Stellar 7 000,SUCCESSION=Succession 000,SUICIDE=Suicide! 000,SWASHBUCKLER=Swashbuckler 000,TAG.TEAM=Tag Team Wrestling 001,TAPPER=Tapper 000,TETRIS=Tetris 000,THE.BILESTOAD=The Bilestoad 010,SUMMER.EDITION=The Games: Summer Edition 010,WINTER.EDITION=The Games: Winter Edition 100,GOONIES=The Goonies 000,SPY.STRIKES.BAK=The Spy Strikes Back 000,THEXDER=Thexder 010,THEXDER128K=Thexder (DHGR) 000,THIEF=Thief 001,THRESHOLD=Threshold 000,THUNDERBOMBS=Thunder Bombs 100,TOMAHAWK=Tomahawk 000,TRACK.AND.FIELD=Track & Field 101,TUBEWAY=Tubeway ][ 000,TUNNEL.TERROR=Tunnel Terror 001,TWERPS=Twerps 001,UP.N.DOWN=Up'n Down 010,VICTORY.ROAD=Victory Road 000,VINDICATOR=Vindicator 000,WARP.DESTROYER=Warp Destroyer 001,WAVY.NAVY=Wavy Navy 101,XEVIOUS=Xevious 101,ZAXXON=Zaxxon 000,ZENITH=Zenith [eof] # # 4cade master game list # # Format: # ABC,directory=name # # A=1 if game requires joystick, 0 if playable on keyboard # B=1 if game requires 128K, 0 if playable on 64K # C=cheat mode category # 0=no cheats (yet!) # 1=infinite lives # 2=infinite lives & weapons # # all other values for A or B -> ignore entire line (like this one!) # A line beginning with '[' terminates the parsing # \ No newline at end of file +000,AGENT.USA=Agent U S A 110,AIRHEART=Airheart 001,ALCAZAR=Alcazar 101,ALIEN.AMBUSH=Alien Ambush 001,ALIEN.DOWNPOUR=Alien Downpour 001,ALIEN.MUNCHIES=Alien Munchies 001,ALIEN.TYPHOON=Alien Typhoon 000,ANKH=Ankh 001,CIDER.SPIDER=Apple Cider Spider 001,APPLE.PANIC=Apple Panic 001,AQUATRON=Aquatron 000,ARGOS=Argos 101,ARKANOID=Arkanoid 001,ASTEROID.BLASTR=Asteroid Blaster 101,AXIS.ASSASSIN=Axis Assassin 000,AZTEC=Aztec 111,BAD.DUDES=Bad Dudes 100,BALLBLAZER=Ballblazer 110,BATMAN=Batman 001,BATTLEZONE=Battlezone 101,BCS.QUEST=BC's Quest For Tires 001,BEER.RUN=Beer Run 000,BEJEWELED=Bejeweled 000,BELLHOP=Bellhop 001,BERZAP=Berzap 000,BEYOND.WOLFEN=Beyond Castle Wolfenstein 000,BUDGETRILOGY=Bill Budge's Trilogy 100,BLACK.MAGIC=Black Magic 000,BLISTER.BALL=Blister Ball 000,BLOCKCHAIN=BlockChain 001,BOLO=Bolo 001,BOUNCING.KMNGAS=Bouncing Kamungas 001,BRAINTEASERBLVD=Brainteaser Boulevard 101,BRUCE.LEE=Bruce Lee 101,BUBBLE.BOBBLE=Bubble Bobble 001,BUCK.ROGERS=Buck Rogers: Planet of Zoom 002,BURGERTIME=BurgerTime 001,BUZZARD.BAIT=Buzzard Bait 001,CANNONBALL.BLTZ=Cannonball Blitz 001,CANYON.CLIMBER=Canyon Climber 000,CAPTN.GOODNIGHT=Captain Goodnight 000,WOLFEN84=Castle Wolfenstein 101,CEILING.ZERO=Ceiling Zero 001,CENTIPEDE=Centipede 001,CHAMP.LODERUN=Championship Lode Runner 100,CHOPLIFTER=Choplifter 011,COMMANDO=Commando 002,CONAN=Conan 001,CRAZY.MAZEY=Crazy Mazey 001,CRIME.WAVE=Crime Wave 101,CRISIS.MOUNTAIN=Crisis Mountain 001,CROSSFIRE=Crossfire 001,CUBIT=Cubit 000,CYBERSTRIKE=Cyber Strike 001,CYCLOD=Cyclod 100,DAVIDS.MAGIC=David's Midnight Magic 010,DEATH.SWORD=Death Sword 101,DEFENDER=Defender 010,D.GENERATION=D-Generation 001,DIAMOND.MINE=Diamond Mine 001,DIG.DUG=Dig Dug 101,DINO.EGGS=Dino Eggs 101,DONKEY.KONG=Donkey Kong 101,DRELBS=Drelbs 001,DROL=Drol 000,DUNG.BEETLES=Dung Beetles 001,EGGS.IT=Eggs-It 000,EPOCH=Epoch 001,FALCONS=Falcons 001,FIREBIRD=Firebird 000,FS2=Flight Simulator II 000,FLIP.OUT=Flip Out 111,FORCE.7=Force 7 100,FORMULA.1=Formula 1 Racer 001,FREE.FALL=Free Fall 001,FROGGER=Frogger 101,FROGGER.II=Frogger II 001,GALAXY.GATES=Galaxy Gates 101,GAMMA.GOBLINS=Gamma Goblins 001,GENETIC.DRIFT=Genetic Drift 001,GOLD.RUSH=Gold Rush 001,GORGON=Gorgon 001,GREMLINS=Gremlins 001,GUARDIAN=Guardian 000,GUMBALL=Gumball 000,HADRON=Hadron 001,HARD.HAT.MACK=Hard Hat Mack 000,HEAD.ON=Head On 110,HEAVY.BARREL=Heavy Barrel 102,HERO=H E R O 000,HIGH.RISE=High Rise 000,HORIZON.V=Horizon V 001,HUNGRYBOY=Hungry Boy 000,HYPER.HEAD.ON=Hyper Head On 010,IKARI.WARRIORS=Ikari Warriors 100,IMPOSSIBLE.MISS=Impossible Mission 010,INDIANA.JONES=Indiana Jones 100,INTL.GRAN.PRIX=International Gran Prix 001,JOUST=Joust 000,JUGGLER=Juggler 001,JUMPMAN=Jumpman 000,JUNGLE.HUNT=Jungle Hunt 100,KAMIKAZE=Kamikaze 000,KARATEKA=Karateka 001,KID.NIKI=Kid Niki 000,LABYRINTH=Labyrinth 001,LADY.TUT=Lady Tut 001,LANCASTER=Lancaster 100,LASER.BOUNCE=Laser Bounce 001,LAZER.SILK=Lazer Silk 001,LODE.RUNNER=Lode Runner 100,LOST.TOMB=Lost Tomb 100,MAD.BOMBER=Mad Bomber 110,MARBLE.MADNESS=Marble Madness 001,MARIO.BROS=Mario Bros. 100,MINER.2049ER=Miner 2049er 101,MINGS.CHALLENGE=Ming's Challenge 001,MONTEZUMA=Montezuma's Revenge 001,MOON.PATROL=Moon Patrol 000,MR.COOL=Mr. Cool 101,MR.DO=Mr. Do! 101,MR.ROBOT=Mr. Robot 001,MS.PACMAN=Ms. Pacman 000,NIBBLER=Nibbler 100,NIGHT.MISSION=Night Mission Pinball 000,NIGHT.STALKER=Night Stalker 000,NIGHTMARE=Nightmare Gallery 000,NORAD=N O R A D 000,ORBITRON=Orbitron 000,ORILEYS.MINE=O'Riley's Mine 000,OOTW=Out of This World 000,OUTPOST=Outpost 000,PAC.MAN=Pac-Man 010,PAPERBOY=Paperboy 001,PEST.PATROL=Pest Patrol 100,PHANTOMS.FIVE=Phantoms Five 000,PHASER.FIRE=Phaser Fire 000,PHOTAR=Photar 000,PICNIC.PARANOIA=Picnic Paranoia 000,PIEMAN=Pie-Man 010,PIPEDREAM=Pipe Dream 100,PITFALL.II=Pitfall II 000,PITSTOP.II=Pitstop II 000,PLASMANIA=Plasmania 110,PLATOON=Platoon 000,POLLYWOG=Pollywog 001,POOYAN=Pooyan 010,PRINCEUNP=Prince of Persia 110,QIX=Qix 100,QUADRANT.6112=Quadrant 6112 010,RADWARRIOR=Radwarrior 010,RAMPAGE=Rampage 000,RASTER.BLASTER=Raster Blaster 100,RED.ALERT=Red Alert 110,RENEGADE=Renegade 000,REPTON=Repton 000,RESCUE.RAIDERS=Rescue Raiders 000,RIBBIT=Ribbit 000,ROADBLOCK=Roadblock 010,ROBOCOP=Robocop 000,ROBOTRON=Robotron 2084 000,RUSSKI.DUCK=Russki Duck 000,SABOTAGE=Sabotage 001,SAMMY.LIGHTFOOT=Sammy Lightfoot 000,SEA.DRAGON=Sea Dragon 000,SEAFOX=Seafox 001,SERPENTINE=Serpentine 100,SHAMUS=Shamus 000,SHORT.CIRCUIT=Short Circuit 000,SHUFFLEBOARD=Shuffleboard 000,SITUATION.CRTCL=Situation Critical 100,SKYFOX=Skyfox 000,SNACK.ATTACK=Snack Attack 000,SNAKE.BYTE=Snake Byte 001,SNEAKERS=Sneakers 000,SNOGGLE=Snoggle 100,SPACE.EGGS=Space Eggs 000,SPACE.QUARKS=Space Quarks 000,SPACE.RAIDERS=Space Raiders 000,SPARE.CHANGE=Spare Change 000,SPDWAY.CLASSIC=Speedway Classic 010,SPIDERBOT=Spiderbot 000,SPIDER.RAID=Spider Raid 000,SPY.HUNTER=Spy Hunter 001,SPYS.DEMISE=Spy's Demise 100,STARBLASTER=Starblaster 000,STAR.BLAZER=Star Blazer 100,STARGATE=Stargate 000,STAR.THIEF=Star Thief 000,STELLAR.7=Stellar 7 000,SUCCESSION=Succession 000,SUICIDE=Suicide! 000,SWASHBUCKLER=Swashbuckler 000,TAG.TEAM=Tag Team Wrestling 001,TAPPER=Tapper 000,TETRIS=Tetris 000,THE.BILESTOAD=The Bilestoad 010,SUMMER.EDITION=The Games: Summer Edition 010,WINTER.EDITION=The Games: Winter Edition 100,GOONIES=The Goonies 000,SPY.STRIKES.BAK=The Spy Strikes Back 000,THEXDER=Thexder 010,THEXDER128K=Thexder (DHGR) 000,THIEF=Thief 001,THRESHOLD=Threshold 000,THUNDERBOMBS=Thunder Bombs 100,TOMAHAWK=Tomahawk 000,TRACK.AND.FIELD=Track & Field 101,TUBEWAY=Tubeway ][ 000,TUNNEL.TERROR=Tunnel Terror 001,TWERPS=Twerps 001,UP.N.DOWN=Up'n Down 010,VICTORY.ROAD=Victory Road 000,VINDICATOR=Vindicator 000,WARP.DESTROYER=Warp Destroyer 001,WAVY.NAVY=Wavy Navy 101,XEVIOUS=Xevious 101,ZAXXON=Zaxxon 000,ZENITH=Zenith [eof] # # 4cade master game list # # Format: # ABC,directory=name # # A=1 if game requires joystick, 0 if playable on keyboard # B=1 if game requires 128K, 0 if playable on 64K # C=cheat mode category # 0=no cheats (yet!) # 1=infinite lives # 2=infinite lives & weapons # # all other values for A or B -> ignore entire line (like this one!) # A line beginning with '[' terminates the parsing # \ No newline at end of file diff --git a/src/4cade.a b/src/4cade.a index c730b6ae7..f9d7b93ba 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -145,49 +145,27 @@ SwitchToBank2 !word Ignore ; IRQ vector ($FFFE-F) } LastMover -!if ((hdddataend & 255) > $ec) and ((hdddataend & 255) < $f2) { - ; in the unlikely event that a bit over 16 bytes are left in the page - ; then use it for the stack - STACKBASE = ((hdddataend + 15) and -16) + 1 - FONTSRC = * - !pseudopc STACKBASE + 15 { - FONTDST = * - !source "src/ui.font.data.lc2.a" - COPYDST = * - COPYSRC = LastMover + COPYDST - FONTDST - !source "src/ui.font.lc2.a" - !source "src/prodos.impl.lc2.a" - !source "src/glue.prorwts2.lc2.a" - !source "src/glue.launch.lc2.a" - !source "src/hw.accel.lc2.a" - LCRAM2_END = * - !if * > $E000 { - !error "code is too large: ends at ", * - } - } -EvenLasterMover -} else { - ; otherwise place stack after code - ; and begin font on the next page - COPYSRC = * - !pseudopc hdddataend { - COPYDST = * +COPYSRC = * +!pseudopc hdddataend { + COPYDST = * !source "src/prodos.impl.lc2.a" !source "src/ui.font.lc2.a" !source "src/glue.prorwts2.lc2.a" !source "src/glue.launch.lc2.a" !source "src/hw.accel.lc2.a" - STACKBASE = * - LCRAM2_END = STACKBASE + 15 - FONTDST = (LCRAM2_END + 255) and -256 + STACKBASE = * + LCRAM2_END = STACKBASE + 15 + !if LCRAM2_END > DisableAccelerator { + !error "code is too large: ends at ", LCRAM2_END } + FONTDST = (LCRAM2_END + 255) and -256 +} EvenLasterMover FONTSRC = * - !pseudopc FONTDST { +!pseudopc FONTDST { !source "src/ui.font.data.lc2.a" - !if * > $E000 { + !if * > $E000 { !error "code is too large: ends at ", * - } } } !if RELBASE = $2000 { diff --git a/src/4cade.init.a b/src/4cade.init.a index 4a3ac2d3f..ec0011be2 100644 --- a/src/4cade.init.a +++ b/src/4cade.init.a @@ -134,6 +134,16 @@ inc @FM+5 bne @FM + ldy #>(255 + EvenLasterMover - LastMover) +@LM lda COPYSRC,x ; relocate pseudo-ProDOS to RAM bank 2 + sta COPYDST,x + inx + bne @LM + inc @LM+2 + inc @LM+5 + dey + bne @LM + ldy #4 @ELM lda FONTSRC,x ; relocate font data to RAM bank 2 @@ -145,16 +155,6 @@ dey bne @ELM - ldy #>(255 + EvenLasterMover - LastMover) -@LM lda COPYSRC,x ; relocate pseudo-ProDOS to RAM bank 2 - sta COPYDST,x - inx - bne @LM - inc @LM+2 - inc @LM+5 - dey - bne @LM - +READ_ROM_NO_WRITE jsr BuildAcceleratorFunction +READ_RAM2_WRITE_RAM2 diff --git a/src/constants.a b/src/constants.a index c276419f0..055b01a10 100644 --- a/src/constants.a +++ b/src/constants.a @@ -9,14 +9,14 @@ ; D000..E635 - persistent data structures (per-game cheat categories, ; gGlobalPrefsStore, gGamesListStore) ; ...unused... -; ECBB..FFF9 - main program code +; ECA6..FFF9 - main program code ; FFFA..FFFF - NMI, reset, IRQ vectors ; ; LC RAM BANK 2 ; D000..D3FF - ProRWTS data ; D400..D66F - ProRWTS code -; D670..DB6C - HGR font code & ProRWTS glue code -; DB6D..DB7B - backup of stack (during gameplay and self-running demos) +; D670..DB98 - HGR font code & ProRWTS glue code +; DB99..DBA7 - backup of stack (during gameplay and self-running demos) ; ...unused... ; DBAF..DBFF - (de)acceleration function ; DC00..DFFF - HGR font data diff --git a/src/prelaunch/bejeweled.a b/src/prelaunch/bejeweled.a new file mode 100644 index 000000000..2fe49463e --- /dev/null +++ b/src/prelaunch/bejeweled.a @@ -0,0 +1,24 @@ +;license:MIT +;(c) 2020 by qkumba + +!cpu 6502 +!to "build/PRELAUNCH/BEJEWELED",plain +*=$106 + + !source "src/prelaunch/common.a" + + +ENABLE_ACCEL + lda #callback + sta $4452 + jmp $800 ; decompress + +callback + jsr $BE00 + +DISABLE_ACCEL + rts + +!if * > $1C0 { + !error "code is too large, ends at ", * +} diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index 02c8c9605..910a2de77 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -43,16 +43,22 @@ ProDOS_enter pha @request lda #$d1 + cmp #$40 + beq @imp_allocint ;;@do_allocint + cmp #$41 + beq @do_deallocint cmp #$80 - beq @do_readblock + beq @imp_rdwrblock ;;@do_readblock cmp #$81 - beq @do_writeblock + beq @imp_rdwrblock ;;@do_writeblock + cmp #$c0 + beq @do_create cmp #$c4 - beq @do_getattrib + beq @imp_getattrib ;;@do_getattrib cmp #$c6 - beq @do_nothing + beq @do_setprefix cmp #$c7 - beq @do_prefix + beq @do_getprefix cmp #$c8 beq @do_open cmp #$ca @@ -63,19 +69,21 @@ ProDOS_enter beq @do_close cmp #$ce beq @do_seek - cmp #$d1 + cmp #$d0 + beq @do_seteof +;; cmp #$d1 ;; bne @do_fatal -@do_eof - jmp @imp_eof +@do_geteof + jmp @imp_geteof +@do_allocint +;; jmp @imp_allocint @do_readblock @do_writeblock - jmp @imp_rdwrblock +;; jmp @imp_rdwrblock @do_getattrib - jmp @imp_getattrib -@do_nothing - jmp @restore_zp -@do_prefix - jmp @imp_prefix +;; jmp @imp_getattrib +@do_getprefix + jmp @imp_getprefix @do_open jmp @imp_open @do_read @@ -84,12 +92,31 @@ ProDOS_enter jmp @imp_write @do_close jsr @imp_close ;subroutine special case because of dual-use +@do_deallocint ;nothing for now +@do_create ;nothing for now +@do_setprefix ;nothing for now +@do_seteof ;nothing for now jmp @restore_zp @do_seek jmp @imp_seek @do_fatal ;; jmp ProDOS_fatal +@imp_allocint + ldy #2 + lda (ipacket), y + sta ProDOS_irq + 1 + iny + lda (ipacket), y + sta ProDOS_irq + 2 + lda #ProDOS_int + sta $3fe + sta $fffe + stx $3ff + stx $ffff + bne @jmp_zp2 ;always + @imp_rdwrblock and #$7f tay @@ -143,7 +170,7 @@ ProDOS_enter @jmp_zp2 jmp @restore_zp -@imp_prefix +@imp_getprefix ldx #buffer jsr @setbuffer1 ldy ProDOS_prefix @@ -259,7 +286,7 @@ ProDOS_enter @jmp_zp jmp @restore_zp -@imp_eof +@imp_geteof ldy #2 lda bleftlo sta (ipacket), y @@ -513,6 +540,28 @@ ProDOS_savedY ProDOS_unit !byte $d1 +ProDOS_int + pha + txa + pha + tya + pha +ProDOS_irq + jsr $d1d1 ;SMC + pla + tay + pla + tax + pla + bit $c012 + bmi + + lda $45 ++ rti + + !if * > $bf58 { + !error "code is too large, ends at ", * + } + ProDOS_fatal ;only for debugging, will be removed ;; bit $c081 ;; pha diff --git a/src/ui.font.lc2.a b/src/ui.font.lc2.a index 85e873479..f73c554e6 100644 --- a/src/ui.font.lc2.a +++ b/src/ui.font.lc2.a @@ -38,14 +38,13 @@ DrawPageInternal beq @doneParsingLine ldx #3 - cmp @subs_a,x - beq @makesub - dex - bpl - - bmi + -@makesub + bne @nosub lda @subs_b,x sta (PTR),y -+ iny +@nosub + dex + bpl - + iny bne @parseLine @doneParsingLine sty SAVE @@ -99,17 +98,15 @@ DrawCenteredStringInternal ; clobbers PTR/PTR+1 +STAY PTR - php ldy #0 - lda (PTR),y - sta HTAB + php lda #40 sec - sbc HTAB + sbc (PTR),y lsr sta HTAB plp - jmp + + beq + DrawStringInternal ; A/Y contains address of length-prefixed string @@ -145,12 +142,7 @@ DrawBufferInternal ; VTAB is NOT incremented ; clobbers A/X/Y +STAY @src+1 - bcs + - lda #$00 - +HIDE_NEXT_2_BYTES -+ - lda #$60 - sta @pagemask + php dex lda VTAB asl @@ -174,10 +166,12 @@ DrawBufferInternal adc #$10 asl @hgrlo+1 rol -@pagemask=*+1 - eor #$FD ; SMC (0=hi-res page 1, #$60=hi-res page 2) - sta @row0+2 + plp + bcc + + eor #$60 clc ++ + sta @row0+2 adc #$04 sta @row1+2 adc #$04