Jump to content
IGNORED

Some VBXE stuff


Stephen

Recommended Posts

Been far too long since I've done any 8-bit coding.  I've recently been learning both MADS and the VBXE.  I'm posting an ATR now that I've finally made a bit of progress.  It's nothing earth shattering.   I'm attaching an ATR with 3 apps.  Couple caveats.  First, obviously, VBXE is required.  Altirra works fine if you don't have real hardware.  Secondly - SDX is required.  Third, the error checking is rudimentary at best.

 

In the SCROLERS directory, you'll find 2 exectuables.  Each one will load a 320*480@8-bpp image (2 screen heights) and scroll the image.  I highly recommend loading from a HDD, as each image is 150kB.  Pressing Q at any time during the scroll will exit back to the command line.

 

Now the cool one (IMHO).  In the 1024CLRS directory is a single executable.  This will show a static 320*240 image, with 1024 colours on the screen.  Because of this, all 4 palettes are used.  Do NOT exit this demo by hitting reset!  If you do, just reload it, and cleanly exit by hitting a key.  This will reset Palette 0 back to the initial state.

 

I'll be starting a blog on this topic as I progress.  The 1024 colour image is just a little preview of something I have in mind.

 

As always, images look best on a real CRT.  I would love to post shots of mine, but my cell phone can in no way cope with the 50Hz monitor refresh (I'm in 60Hz land).  Here's a shot from Altirra, which does not do it justice!

stan1024.thumb.png.639ee6b311094dca56bd2b782036b10e.png

VBXE.zip

  • Like 14
  • Thanks 4
Link to comment
Share on other sites

11 hours ago, Stephen said:

but my cell phone can in no way cope with the 50Hz monitor refresh (I'm in 60Hz land).

My iPhone doesn’t like CRT screens at all by default. I paid something like $2 for an app called DSLR Camera. That app lets you set and lock shutter speed, exposure, equivalent film speed, etc. Very useful for snaps of CRTs. 

 

Anyway, thanks for the ATR, Stephen. I’ll try to give these a try this afternoon on my VBXE-equipped PAL 1088XLD. 

  • Like 2
Link to comment
Share on other sites

2 minutes ago, DrVenkman said:

My iPhone doesn’t like CRT screens at all by default. I paid something like $2 for an app called DSLR Camera. That app lets you set and lock shutter speed, exposure, equivalent film speed, etc. Very useful for snaps of CRTs. 

 

Anyway, thanks for the ATR, Stephen. I’ll try to give these a try this afternoon on my VBXE-equipped PAL 1088XLD. 

Love to see how the photos turn out.

Link to comment
Share on other sites

3 hours ago, DrVenkman said:

My iPhone doesn’t like CRT screens at all by default. I paid something like $2 for an app called DSLR Camera. That app lets you set and lock shutter speed, exposure, equivalent film speed, etc. Very useful for snaps of CRTs.

Interesting. My wife's iPad Pro auto syncs with every CRT I've thrown at it. I suppose the cameras are different? Although, I've only tried a few CRT models so far.

Edited by LiqMatrix
Link to comment
Share on other sites

@Stephen  Thanks. Running it on my VBXE/U1MB 800XL off Side3.1. Took me a minute to realise it is an ATR with files in subfolders. So mounted it in the SIDE3 menu and booted to SDX. were I was then able to navigate to the Com files in turn and load them from SDX command line.

Just  athought  wondering if you could include a DOS in the ATR if that is easier so the file is bootable?

 

Some great images there and nice smooth vertical scrolling. :)

  • Like 1
Link to comment
Share on other sites

51 minutes ago, DrVenkman said:

He said SDX was one of the requirements, so you wouldn't expect the disk to be bootable by itself.

I just extracted the files from the ATR, dumped the two folders on a FAT32 formatted SD card, and ran the programs from the SIDE3 loader. The 1024CLRS demo worked fine, but the two scrollers failed to load the RAW files. This failure is caused by there being no NUL terminators ($00) or EOLs at the end of the two embedded RAW filenames in the executables (which is a carry-over from Candle's original demos). SDX doesn't mind this, but my FMS objects (it expects zero or EOL terminated filespecs). Other than that, there's no dependency on SpartaDOS that I can see, so if @Stephen fancies adding termination to the filenames, there's no need for an ATR or SDX at all.

 

Very impressive demos, anyway, and it's nice to see something new written for VBXE.

Edited by flashjazzcat
  • Like 4
Link to comment
Share on other sites

1 hour ago, Beeblebrox said:

@Stephen  Thanks. Running it on my VBXE/U1MB 800XL off Side3.1. Took me a minute to realise it is an ATR with files in subfolders. So mounted it in the SIDE3 menu and booted to SDX. were I was then able to navigate to the Com files in turn and load them from SDX command line.

Just  athought  wondering if you could include a DOS in the ATR if that is easier so the file is bootable?

 

Some great images there and nice smooth vertical scrolling. :)

My plan was to make a bootable ATR with these.  For some reason, they don't work in MyDOS and I was so excited to post them, I didn't spend time debugging.  I've never done  CIO in assembler before so this is a huge learning curve at the moment.

  • Like 1
Link to comment
Share on other sites

46 minutes ago, flashjazzcat said:

I just extracted the files from the ATR, dumped the two folders on a FAT32 formatted SD card, and ran the programs from the SIDE3 loader. The 1024CLRS demo worked fine, but the two scrollers failed to load the RAW files. This failure is caused by there being no NUL terminators ($00) or EOLs at the end of the two embedded RAW filenames in the executables (which is a carry-over from Candle's original demos). SDX doesn't mind this, but my FMS objects (it expects zero or EOL terminated filespecs). Other than that, there's no dependency on SpartaDOS that I can see, so if @Stephen fancies adding termination to the filenames, there's no need for an ATR or SDX at all.

 

Very impressive demos, anyway, and it's nice to see something new written for VBXE.

Odd - all of my strings were null terminated (single $00 byte).  I'll have to check and see why this is the case.

Link to comment
Share on other sites

11 minutes ago, Stephen said:

My plan was to make a bootable ATR with these.

I'm just thinking it's also super-convenient to put the contents of each ATR in its own FAT folder for those who want to do so (or who have no means of mounting ATRs).

12 minutes ago, Stephen said:

Odd - all of my strings were null terminated (single $00 byte).  I'll have to check and see why this is the case.

The filename isn't:

1450525906_rawfilename.thumb.png.e726d219ca0ba137882671d91b7cddde.png

As discussed elsewhere, I should probably fix this at my end since it's a compatibility matter whether I approve of unterminated filenames or not. :)

 

I can't recall whether MYDOS is also affected by this.

 

  • Thanks 1
Link to comment
Share on other sites

The issue under discussion results in DOS generating a bad filename error because it saw no string terminator and thus counted illegal trailing characters as part of the filename when a CIO 'open file' command is issued. One partial solution is for DOS to terminate the filespec as soon as it sees an illegal character, but this method is prone to failure too, since it's possible that bytes beyond the end of the unterminated string may actually be legitimate filename characters and therefore be spuriously counted as part of the filename. Perhaps in this case the caller is setting ICBLL/H to the length of the unterminated filename and DOS is ignoring it (mine does, so this would be an easy fix at my end).

 

Formatted directory listings are always EOL terminated, so problems with menus, etc, tend to have different causes (commonly the file size or free sector counts not having the expected number of characters, as with some versions of MYDOS).

Edited by flashjazzcat
  • Like 1
Link to comment
Share on other sites

I've not had chance to give it a look yet.

How is it you're doing the 4 palettes?  Is it selection of a palette depending on close colour matches or do you just split the screen into 4 vertical regions with 1 per region?

I had an idea of doing 5 palettes - you could reload the first one using brute-force programing, ie LDA #nn / STA CR ... etc.

Though that's a cost of 18 cycles and 15 bytes per entry = 4608 cycles and 3,840 bytes (with Antic DMA off that would be around 44 scanlines)

So in theory you could probably do 3 or 4 palette reloads for even more extra colour.  The palette reload code could be generated by blits which could cut down on memory use a little.

 

Though all that said, I think a PC based optimizer that generated 4 palettes and selected one per attribute cell based on best match would probably be the best picture display method.

Link to comment
Share on other sites

3 minutes ago, Thelen said:

I'm trying from Altirra 🙂

cool. so this might help get you started - where setting up an emulated Side2 in this instance will give you SDX to then mount the ATR:

 

 

You could also emulate Side3 or other devices with SDX emulated - I am on a work break so just quickly Googled and there will likely be others suggesting far more obvious ways ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...