|
Post by mirkosoft on Oct 1, 2014 17:20:48 GMT
Hi!
I was never interest in VIC2 or VIC2E programming but I have one idea - only for two purposes only - less memory costs and easy text output:
Is possible, better to say how is possible to split VIC2 or VIC2E screen to:
4 rows of text 17 rows of bitmap 4 rows of text
it reduces costs for bitmap to 5440 Bytes + 160 bytes of top text + 160 Bytes of bottom text + 680 Bytes of attributes (I mean HiRes mode only) = 6440 Bytes ~ 6K
Can help me anybody who knows VIC2 or VIC2E programming to write code? I know there is important raster IRQ, but which values to write with config:
Bitmap at $2000 - parts of bitmaps unused, but if meaning full-bitmap mode Text + attributes at $2000, so at unused bitmap area... there you can see reason why must to be 4 lines of top text (1280 Bytes - correctly 272 free bytes, 8 bytes as sprite pointers)
Thank you all for every help, first time since I'm 128'er and it's not few minutes I'm attacking VIC2 or VIC2E :)
Miro
|
|
|
Post by VDC 8x2 on Oct 2, 2014 0:21:30 GMT
the bit map will be using 8 time the information of a text screen. I can see a way to do it but you will need 3 irq's.
The sprite pointers are always at the end of the 1000 byte screen memory. They are always on that offset.
|
|
|
Post by hydrophilic on Oct 2, 2014 6:49:25 GMT
What you say IS POSSIBLE!
In MP128, many videos are 'wide screen' = 16:9 aspect ratio... so the top (about 4 rows) is coded as 'impossible', then the main image (about 17 rows) is the 'real' video, and the bottom (about 4 rows) is coded as 'impossible'.
Note that 'impossible' referred to above is using VIC-II video modes: multi-color + EBCM (extended background color mode). This forces trick forces a black screen for the 'top border' and the 'bottom border'. The real image (17 rows) uses either Multi-Color Text or Multi-Color Bitmap depending on video encoder settings...
I can provide links to my source code upon request, but it is probably WAY TO COMPLICATED for the simple effect you describe. The important thing is "You can do it!" ... you just need 3 separate IRQs: - The 'top' text (blank trick in MP128... could be real text for you)
- The 'main' image (either Bitmap or Text mode... you, the programmer, can choose)
- The 'bottom' text (blank trick in MP128... could be real text for you)
Ask for more details if you want!
|
|
|
Post by mirkosoft on Oct 2, 2014 12:28:00 GMT
Hi Richard! Really you never fail! OK, MP3 is for me not important, of course really nice trick. I have no problem to create IRQ, only problem is adjusting correct raster values for exactly setting 4 rows, then 17 rows and again 4 rows. These values I think is not easy to set, so main help are these three values... or any help how to calculate these values for using in future for other purposes... My idea: As first turn off shadow registers of VIC (really I was browsing my Commodore 128 files - forgot where it's writen and I was lost in lot of data), so it helps me too Then loop: - set text mode with text area at $2000, other values by written in first post - wait for raster - switch to graphic mode only (nothing more, not VIC values change) - wait for raster - switch to text mode only (no VIC values change) - wait for raster to reach border - switch to 2MHz mode - wait for raster to reach screen - switch to 1 MHz mode ...and again Is it wrong idea? Why are you writting about 3 IRQs? I meant it will be like 1,3MHz overclocking... If you can help me, correct my mistakes and please write raster values for graphic mode begin, graphic mode end (or instructions how to calculate them), always will be useful disabling shadow registers method - I don't know if I remember if it was only in one POKE Miro
|
|
|
Post by hydrophilic on Oct 3, 2014 7:45:53 GMT
Well, if you add in 2MHz speed boost during border, then yes, you would need 4 IRQs. The step-by-step plan you describe above looks good to me!
The raster values are calculated as: 51 + r*8 (where 'r' is 0-based text row)... this assumes you use default Y-scroll value. So the top of the screen is 51, the top of bitmap is 51+4*8=51+24=63, the lower text screen begins at 51+(4+17)*8=51+21*8=51+168=219, and the bottom border begins at 51+25*8=51+200=251.
Do note this is the raster where the "new video" is displayed... you should program the IRQ to be at least 1 raster less (early), so the CPU will have time to change VIC registers. You would also need to experiment and add NOPs or other delays to get a 'perfect' result. Good luck!
Edit Yes, you do need to disable shadow registers. At the very least, store value $ff into address $d8. You may also want to store $c0 into $a04... (this disables SPRITE updates by BASIC, but also kills SOUND and PLAY).
|
|
|
Post by mirkosoft on Oct 4, 2014 20:33:59 GMT
Thank you Robert. Tomorrow I have few free hours, so I'll try it, later publish results here.
Miro
|
|