It is currently Wed Jun 20, 2018 12:22 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sun Nov 01, 2015 8:26 am 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
The x86 architectures has two address spaces: memory and I/O. Everything you've done so far has been in the memory space, which isn't surprising since it's the more commonly used of the two. The one you're looking at now is the I/O address space.

You can only access the I/O space with a few instructions. They are in, out, insb, insw, outsb, and outsw. You'll mostly only want to use in and out for now. Those two instructions haven't changed much in the lifespan of the x86 architecture, so even modern resources can teach you how to use them. (Of course, ignore the parts that reference 32-bit anything, since the V33 is 16-bit.)


Top
 Profile  
 
PostPosted: Sun Nov 01, 2015 9:11 am 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3336
Location: Nacogdoches, Texas
Wait a minute, I just saw something...

Quote:
Master Control registers:
Word 0: Playfield 1 control
Bit 0x40: 1 = Rowscroll enable, 0 = disable
Bit 0x10: 0 = Playfield enable, 1 = disable
Bit 0x04: 0 = 512 x 512 playfield, 1 = 1024 x 512 playfield
Bits 0x03: Playfield location in VRAM (0, 0x4000, 0x8000, 0xc000)
Word 1: Playfield 2 control (as above)
Word 2: Playfield 3 control (as above)
Word 3: Raster IRQ position.

If a bit has to be 0 to enable BGs, doesn't that mean that they should already be enabled? Unless everything starts out 1 filled.

Edit: Oh, wait, everything does start out 0 filled, so every BG is enabled by default. I just moved graphics into the first tile of BG chr rom.


Top
 Profile  
 
PostPosted: Sun Dec 24, 2017 11:15 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3336
Location: Nacogdoches, Texas
I somewhat randomly decided to work on this again, this time ignoring sprites and working on everything else first. I've got reading from the controllers to work (not hard, just check different bits in a register) and have also been able to write to the tilemap and change its position and size in vram in addition to changing the palette. My question though, is that while I can successfully change VRAM (where the tilemap is stored) and CGRAM (or whatever it's called here) whenever I want to during active display in MAME, would it be unlikely that this would work on an actual system?

Also, something I noticed is that there doesn't appear to be a brightness register, which means fadeouts have to be done by changing CGRAM. Potentially, you would need to upload 4KB of color data (2048, 15 bit colors) in one frame, and if you can only update CGRAM during VBlank, it may not be possible. Unless you want to have a huge mass of palettes in ROM, you have to make a routine that darkens them as well, which for simplicity, would be subtracting 1 from red, green, and blue at the same time for every color. I imagine modern video games and image processing programs (unless otherwise specified) make bright color elements and overall colors turn darker faster than already dark ones.


Top
 Profile  
 
PostPosted: Mon Dec 25, 2017 4:09 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3524
Location: Indianapolis
I know nothing about this hardware, and little about MAME internally, so hopefully someone else can chime in with better information.

In general though, I would be extremely cautious about using an emulator for testing a new program. This likely would lead to some headaches. Other than not knowing when it's safe to write to video memory, I can imagine other potential situations such as registers or other settings being initialized differently on the hardware, bugs or quirks in the hardware that the developers had work-arounds for (the undesirable side effects might not be emulated, because the situation never arises in the existing games). All that can be overcome, but I'd expect to run into trouble.

The best setup would be to have a ROM emulator plugged into the actual board, but if those 2 devices together cost like $500 or whatever, that's a pretty expensive hobby. If that board happens to run code from a 27C040 EPROM, I could probably loan you a ROM emulator (parallel port device and may require DOS/Win98 though).


Top
 Profile  
 
PostPosted: Tue Dec 26, 2017 12:52 pm 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3336
Location: Nacogdoches, Texas
Memblers wrote:
I can imagine other potential situations such as registers or other settings being initialized differently on the hardware

Luckily, there aren't to many registers to worry about: http://patpend.net/technical/arcade/m92.html This thing is incredibly straightforward compared to the SNES, but then again, what isn't. :lol:

Memblers wrote:
If that board happens to run code from a 27C040 EPROM

I've been told it runs from a 27C020 EPROM; I have no idea if there's a difference, as they look identical. Well, it uses two and interleaves the bytes, but regardless if your device can support two chips, not even my old Windows XP computer has a parallel port. I just got a bunch of 27C020 EEPROM chips and a EPROM/EEPROM programmer; I have no idea how long it takes to program and reprogram them, but hopefully not long.

Memblers wrote:
but if those 2 devices together cost like $500 or whatever, that's a pretty expensive hobby.

That'll be the cost of the supergun, Sega Genesis to Neo Geo controller converter, SCART cables, SCART to component converter, power supply, EEPROM programmer, EEPROM chips, and the board if I'm lucky. :|


Top
 Profile  
 
PostPosted: Wed Dec 27, 2017 2:31 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 640
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
You can forget EPROMs and get some NOR Flash chips instead unless you fancy waiting 45ish minutes each time when erasing EPROMs with your favorite UV eraser. There might be some pinout differences though and you may have to reroute a VPP line to accomodate a new address line, but that you'll find out when comparing datasheets.
020 parts are 2MBit, 040 are 8MBit. 27Cxxx are EPROMs, 28Fxxx and 29Fxxx are NOR Flash. 29L or LV parts are 3.3V and you want to stay away from those.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Wed Dec 27, 2017 8:56 am 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3336
Location: Nacogdoches, Texas
Yeah, I found some EEPROMs of the right type that I'll buy instead. I have everything in the eBay shopping cart because I figure I'll order it when I get the boards, but I haven't found a good deal yet. :(


Top
 Profile  
 
PostPosted: Wed Dec 27, 2017 10:46 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3524
Location: Indianapolis
Yeah my ROM emulator is just for one 8-bit ROM, sizes 27C64 through 27C040 (8kB through 512kB). It has a connector to chain multiple devices together to support multiple ROMs, but I only have one of them. And it's pretty obscure so I doubt I'll ever see another one. Was made in 1993, I bought it around '99 or '00 for about $200.

Looks like a pair of these newer ROM emulators would run you $374. Assuming the software allows you connect 2 of them.
http://www.moates.net/ostrich-20-the-new-breed-p-169.html?cPath=95
http://www.moates.net/emuc3206-emulation-cable-32pin-6inch-p-168.html?cPath=32

I'd bet if you watched ebay for a while you could probably find a suitable 16-bit ROM emulator for maybe <$100. Between missing cables, being sold in untested condition, and missing software, it might take some luck and/or improvisation. In my case I had to hand-build a 32-pin adapter (just like the one in the link above, which no one sold at the time), by using a 40-pin one, and sawing it off and epoxying it back together (was around the time I first met kevtris, he helped me with that).

Chip programming speed might take a minute or so, but it depends on the exact programmer and chips used. The EPROM eraser I use at work runs for maybe 15 minutes. On the other hand, SST39SF-series parts erase pretty much instantly. AM29F-series seems to vary widely in program/erase times, but it's still much faster than EPROM. Like TmEE said, I'd also recommend going with NOR flash, such as 39SF. But the pinout is a little bit different, so you would have to mod the the board or build some kind of adapter.

Also when it comes to swapping socketed chips often, what I've done before is buy extra IC sockets (the cheap 'dual-wipe' ones, not the machined pins type). Leave the chip permanently in one of those sockets, then plug that into the other socket on the board. The socket-to-socket connect is like a makeshift ZIF socket, instead of prying it out with a screwdriver. Assuming the 2 socket types are compatible, I've always done it with the exact same type so in other cases, who knows.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: 93143 and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group