Previous Thread
Next Thread
Print Thread
Page 2 of 9 1 2 3 4 5 6 7 8 9
Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111319
11/22/17 02:42 PM
11/22/17 02:42 PM
Joined: Jan 2012
Posts: 922
Bavaria
rfka01 Offline OP
Senior Member
rfka01  Offline OP
Senior Member
Joined: Jan 2012
Posts: 922
Bavaria
Welome @helwie44 ... who operates a site on the P2 that I've linked to before and who has worked on the SKS family machines (SKS nano, ITT 3030 and the Alphatronic P1-P4 range).


NCR DMV- DEC Rainbow- Siemens PCD- ITT 3030-Oly People- Acorn A5000- Olivetti M20
Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111334
11/23/17 09:03 AM
11/23/17 09:03 AM
Joined: May 2004
Posts: 856
Germany
D
Duke Offline
Senior Member
Duke  Offline
Senior Member
D
Joined: May 2004
Posts: 856
Germany
Hello and welcome helwie44, I'm not currently working on the Alphatronic machines. It's very nice to see someone who did lots of work on those machines here though.

Eventually I'll continue to work on it (if someone else isn't picking up the driver), then I'll be sure to contact you.

The range 0x3ff0 to 0x3ffe is already forwarded to the crt registers, see https://git.redump.net/mame/tree/src/mame/drivers/alphatpx.cpp#n65 (0x37f0 with mirror 0x800 so it's at 0x37f0 and 0x3ff0).

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111379
11/25/17 11:53 PM
11/25/17 11:53 PM
Joined: Jan 2012
Posts: 922
Bavaria
rfka01 Offline OP
Senior Member
rfka01  Offline OP
Senior Member
Joined: Jan 2012
Posts: 922
Bavaria
Snapshot of current state of alphatpx.cpp at https://github.com/rfka01/mame, ROMs and soft on the FTP.


NCR DMV- DEC Rainbow- Siemens PCD- ITT 3030-Oly People- Acorn A5000- Olivetti M20
Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111380
11/26/17 01:49 AM
11/26/17 01:49 AM
Joined: Dec 2015
Posts: 83
A
AJR Offline
Member
AJR  Offline
Member
A
Joined: Dec 2015
Posts: 83
p3_keyboard_mab8041a.bin looks like an alternate revision of p3_keyboard_8278.bin. However, the former is a bad dump, with D2 equal to A2 in every byte.

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111381
11/26/17 02:48 AM
11/26/17 02:48 AM
Joined: Jan 2012
Posts: 783
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 783
rfka01: I left a PR in your fork to mess with.

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111383
11/26/17 03:24 PM
11/26/17 03:24 PM
Joined: Jan 2012
Posts: 783
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 783
[Linked Image]

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111397
11/27/17 10:56 PM
11/27/17 10:56 PM
Joined: Jan 2012
Posts: 922
Bavaria
rfka01 Offline OP
Senior Member
rfka01  Offline OP
Senior Member
Joined: Jan 2012
Posts: 922
Bavaria
In a swell foop crazyc got the P3 to boot ... the exemplary disk spiele.img boots (others at ftp://ftp.informatik.uni-stuttgart.de/pub/cm/alphatronic/p3/ have issues with copy protection that might not have been transferred into the image, people have problems saving them back to disks and booting them on the real thing).

I need some help understanding the bankdev'd memory map:

Code
static ADDRESS_MAP_START( alphatp3_map, AS_PROGRAM, 8, alphatpx_state )
	AM_RANGE(0x00000, 0x017ff) AM_READ_BANK("rom") AM_WRITE_BANK("ram_0000")  
	AM_RANGE(0x01800, 0x02fff) AM_RAMBANK("ram_1800")						  
	AM_RANGE(0x03000, 0x03bff) AM_RAM AM_SHARE("vram")						  
	AM_RANGE(0x03FF0, 0x03fff) AM_DEVREADWRITE("crtc", crt5037_device, read, write) //test hw

	AM_RANGE(0x04000, 0x0ffff) AM_RAMBANK("ram_4000")
	AM_RANGE(0x10000, 0x1ffff) AM_RAMBANK("ram")
ADDRESS_MAP_END


and

Code
WRITE8_MEMBER(alphatpx_state::bank_w)
{
	m_bankdev->set_bank(BIT(data, 6));
}


Does that mean that depending on the state of bit 6 of bank_w, either "rom" or "ram_0000" is selected?

Why is the line
Code
AM_RANGE(0x10000, 0x1ffff) AM_RAMBANK("ram")
needed, as it specifies 64K-128K RAM in a strictly 64K system?

If I omit it, MAME crashes with the error

Code
-----------------------------------------------------
Exception at EIP=000000000226b37f (memory_bank::set_base(void*)+0x000f): ACCESS VIOLATION
While attempting to read memory at 0000000000000008
-----------------------------------------------------
RAX=0000000000000000 RBX=0000000020b5b8d0 RCX=0000000000000000 RDX=000000002aaf4f50
RSI=000000002aaf4f50 RDI=00000000000012b8 RBP=000000001c308240 RSP=000000001c308220
 R8=000000000001b6b3  R9=0000000000000004 R10=000000000000000f R11=000000001c308200
R12=0000000000000000 R13=0000000000000001 R14=000000001c308790 R15=0000000004dc0168
-----------------------------------------------------
Stack crawl:
  000000001c308230: 000000000226b37f (memory_bank::set_base(void*)+0x000f)
  000000001c3082c0: 0000000000b7f67e (alphatpx_state::machine_start()+0x010e)
  000000001c308310: 0000000002264bc3 (driver_device::device_start()+0x02f3)
  000000001c308420: 000000000221c4d0 (device_t::start()+0x0090)
  000000001c3084a0: 00000000022ba992 (running_machine::start_all_devices()+0x00c2)
  000000001c3085a0: 00000000022bf44f (running_machine::start()+0x085f)
  000000001c3086a0: 00000000022c0ad0 (running_machine::run(bool)+0x0140)
  000000001c30f250: 0000000000eb1493 (mame_machine_manager::execute()+0x01e3)
  000000001c30f4f0: 0000000000f22d29 (cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)+0x03f9)
  000000001c30f680: 0000000000f231a5 (cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x0045)
  000000001c30f6e0: 0000000000eaf52a (emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)+0x002a)
  000000001c30fe50: 00000000041b221d (main+0x013d)
  000000001c30ff20: 00000000004013f8 (__tmainCRTStartup+0x0248)
  000000001c30ff50: 000000000040151b (mainCRTStartup+0x001b)
  000000001c30ff80: 00007ffcc48f1fe4 (BaseThreadInitThunk+0x0014)
  000000001c30ffd0: 00007ffcc714ef91 (RtlUserThreadStart+0x0021)
Segmentation fault


How do I read the lines in machine start

Code
	membank("rom")->set_base(memregion("boot")->base());
	membank("ram_0000")->set_base(m_ram.get() + 0x0000);
	membank("ram_1800")->set_base(m_ram.get() + 0x1800);
	membank("ram_4000")->set_base(m_ram.get() + 0x4000);
	membank("ram")->set_base(m_ram.get());


Returning to the address map, can memory regions be grouped and banked in and out - the P3 swaps between 0x0000-0x3fff RAM and ROM/RAM1800/VRAM/CRTC for every access to the video memory, disk routines et al. - at the moment I think only 0x0000-0x17ff get swapped.


NCR DMV- DEC Rainbow- Siemens PCD- ITT 3030-Oly People- Acorn A5000- Olivetti M20
Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111398
11/27/17 11:07 PM
11/27/17 11:07 PM
Joined: Mar 2001
Posts: 16,004
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,004
USA
The bankdev device is very powerful: it maps a sliding-window view of its own address map into the source address map.

The key is here:

MCFG_ADDRESS_MAP_BANK_STRIDE(0x10000)

That means that the number you pass to set_bank is multiplied by that to get where in the bankdev's address map is visible in the main address map.

So Z80 address 0 is 0 in the bankdev's map when set_bank(0), and Z80 address 0 is 0x10000 in the bankdev's map when set_bank(1). MAME crashes when you omit the RAM because it's not an additional 64K, it's the base 64K for CP/M mode where 100% of the 64K is usable RAM.

The bonus of all of this over conventional banking in MAME is that it's much faster when the bank view changes frequently, because it's only updating the base address of the sliding window. The "new" 2014 Apple II driver was about 3 times faster simply because I changed it to use bankdev instead of the old-style banking.

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111399
11/28/17 12:40 AM
11/28/17 12:40 AM
Joined: Mar 2001
Posts: 16,004
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,004
USA
Also, these lines

Code
	membank("rom")->set_base(memregion("boot")->base());
	membank("ram_0000")->set_base(m_ram.get() + 0x0000);
	membank("ram_1800")->set_base(m_ram.get() + 0x1800);
	membank("ram_4000")->set_base(m_ram.get() + 0x4000);
	membank("ram")->set_base(m_ram.get());


...map the various RAM views in bank 0 to their correct places in the full 64K in bank 1.

Re: Triumph-Adler alphatronic P3 (+ P1, P2 and P4) [Re: rfka01] #111400
11/28/17 04:06 AM
11/28/17 04:06 AM
Joined: Jan 2012
Posts: 783
C
crazyc Offline
Senior Member
crazyc  Offline
Senior Member
C
Joined: Jan 2012
Posts: 783
I did some of this in a new PR but there are still issues with the way the rom is mapped. MBasic for example tries to do CP/M syscalls (CALL 5) while the rom is mapped in resulting in a branch to the wrong place.

Page 2 of 9 1 2 3 4 5 6 7 8 9

Who's Online Now
1 registered members (xinyingho), 72 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,574
Posts112,027
Members4,812
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.029s Queries: 14 (0.011s) Memory: 5.7355 MB (Peak: 5.9561 MB) Zlib enabled. Server Time: 2018-09-18 21:04:53 UTC