Open Top/Bottom is easy, side borders need cycle exact timing every line you use it. source code www.lemon64.co... Scarlet (instrumental) • 엉덩이 Hip Song (Inst.) Full • 스칼렛 Scarlet - 엉덩이 Hip...
Пікірлер: 14
@PeaceDub2 жыл бұрын
Wow this was very impressive! So nice of you to share the code also. 🙏
@8_Bit2 жыл бұрын
Nice work! I've done this once before back around 1999, it was tricky to figure out the timing for sure.
@tonysofla2 жыл бұрын
Yea, had to play with turning two NOP's (4 cycles) in to 2 cycles (EOR) or 3 cycles BIT to make it work both PAL and NTSC. Used Align so the BNE cycles don't change on you.
@tonysofla2 жыл бұрын
check out my updated with proportional font: kzbin.info/www/bejne/naDNp5RjnLqAjqc
@tonysofla2 жыл бұрын
The trick for stable raster is to have a IRQ hit while you're still within IRQ that are just doing NOP's at the time. See below, got questions? IRQ1 INC $D012 ; we only have as little as 18 cycles left... 6 LDX #$35 ; ...as kernal delay is 38-45 cycles 2 STX $01 ; turn off kernal so ram now has our irq vector 3 STX $D019 ; acknowledge the interrupt by clearing flag 4 CLI ; enable IRQ 2 NOP ; only as little as 2 cycle instructions until IRQ hits again NOP ; raster IRQ will hit somewhere here NOP NOP NOP NOP NOP IRQ2 LDX #$37 ; turn on kernal so rom is now our irq vectors again STX $1 ; Pre-setting IRQ2 in RAM was the only way to be fast enough PLA PLA ; restore stack pointer as no reti was done PLA ; and we did not have time to use TSX NOP................. ; enough nops to hit next raster change at 0 or 1 jitter LDX #38 ; IRQ1 hit at line 36 , IRQ2 at line 37 CPX $d012 ; RASTER line number changed to 38 yet? BNE *+2 ; 1 more cycle by branching to next instruction Zero Jitter now
@taltechchip58272 жыл бұрын
Nice. Stable raster lines where always tricky thing. I used a timing table for that back in the days
@madcommodore2 жыл бұрын
I really hated that the C64 could not have borders even widened like on the VIC-20. I guess they had to fit everything into the 64kb address range so figures 8k bitmap was the maximum. Other than the borders the C64 was the best compromise of any 8bit in the early 80s.
@danielmantione2 жыл бұрын
The reason the bitmap is 8K limited is that the VIC-II can only see 16KB of RAM. Using all 16K for the bitmap isn't possible because then there is no space for the screen RAM (used for colour in bitmap mode). Add to this the knowledge that the CPU needs to run at 1MHz and that the VIC-II processes 1 byte of bitmap data per cycle. That is 8 pixels per cycle, so 8MHz pixel clock. 8Mhz pixel clock combined with PAL timing results in 504 pixels per line (and PAL has 312 lines). 8K bitmap means you have only 320x200 active resolution and hence the need for a rather large border.
@madcommodore2 жыл бұрын
@@danielmantione Well you have to deal with 4x16kb banks because like I say they had to fit it all in and a 65xx CPU can only see 16bit size of total address space at a time so having variable sized screens would be a tough call. The VIC-20 would never have that problem as it had spare addresses to play with in the 16bit address space for the 6502. Still looks VERY naff. Coleco was only a 32 column display but didn't have borders, neither did the 32 column Famicom. Bad move.
@danielmantione2 жыл бұрын
@@madcommodore Clock speed is really key. The Famicom, Atari A8 line and Commodore TED lines agree a lot on the clock speeds: All around 1.77Mhz. At that clock speed, avoiding a big border is much easier.
@rwxdesigns2 жыл бұрын
Yeah, remember this being done on the title screen for Leviathan in 1987. Top and side borders, I had a look at the code on my Action Replay V back then. kzbin.info/www/bejne/rqCunJqOpaZ5p5Y
@tonysofla2 жыл бұрын
Looking at raw machine code would make it hard to get a grip how it's doing it. I link to my source code with comments. Though raster irq happens on exact pixel, you will have a random delay as current instruction needs to finish first, if you know that you're only doing NOP's (2 cycle opcode) when a raster IRQ happens, then your jitter is down to 0 or 1 cycles, it's called double irq stable raster trick.
@rwxdesigns2 жыл бұрын
@@tonysofla yeah - I worked out the Leviathan method back then, the disassembler in the AR5 was okay for that sort of thing. I've looked at your source on Lemon, it's one way to do the trick nicely. There's plenty of different methods out there though, nice work all the same.